Electromechanical pill device with localization capabilities

ABSTRACT

Various embodiments are described herein for a device, system, and method for identifying a location of an ingestible device within a gastrointestinal tract of a body. In some embodiments, the ingestible device includes a sensing unit with an axial optical sensing sub-unit located proximal to at least one end of the device, and a radial optical sensing sub-unit located proximal to a radial wall of the device, and may autonomously identify a location within the gastrointestinal tract. In some embodiments, the ingestible device includes optical illumination sources and detectors that operate at a plurality of different wavelengths, and may discern regions of a gastrointestinal tract by using the reflection properties of organ tissue and occasional particulates. In some embodiments, the ingestible device may sample fluid or release medicament based on a detected device location.

BACKGROUND

The gastrointestinal (GI) tract generally contains a wealth ofinformation regarding an individual's body. For example, contents in theGI tract may provide information regarding the individual's metabolism.An analysis of the contents of the GI tract may also provide informationfor identifying relationships between the GI content composition (e.g.,relationship between bacterial and biochemical contents) and certaindiseases or disorders.

Present methods and devices for analyzing the GI tract are limited incertain aspects, such as the accuracy of the data retrieved from the GItract. Data retrieved from the GI tract can include physical samplesand/or measurements. The value of the retrieved data can depend, to anextent, on how accurately the location from which the data is retrievedcan be identified. However, in vivo location detection within the GItract can be difficult. The different segments within the GI tract may,at times, include certain substances (e.g., blood) that can impact invivo location detection and there may also be differences in the GItract amongst different individuals.

SUMMARY

In some aspects, an ingestible device for identifying a location withina gastrointestinal (GI) tract of a body is provided herein. Theingestible device includes a housing defined by a first end, a secondend substantially opposite from the first end, and a radial wallextending longitudinally from the first end to the second end; a sensingunit inside the housing, the sensing unit including: an axial opticalsensing sub-unit located proximal to at least one of the first end andthe second end, the axial optical sensing sub-unit being configured totransmit an axial illumination towards an environment external to thehousing and to detect an axial reflectance from the environmentresulting from the axial illumination; and a radial optical sensingsub-unit located proximal to the radial wall, the radial optical sensingsub-unit being configured to transmit a radial illumination towards theenvironment external to the housing and to detect a radial reflectancefrom the environment resulting from the radial illumination, the radialillumination being substantially perpendicular to the axialillumination; wherein a processing module is configured to identify thelocation of the ingestible device based on at least the detected radialand axial reflectance.

In at least some embodiments, the processing module may be an externalprocessing module and the device may further comprise a communicationmodule configured to transmit one or more radial reflectance valuescorresponding to the detected radial reflectance and one or more axialreflectance values corresponding to the detected axial reflectance tothe external processing module.

In at least some embodiments, the device may comprise the processingmodule.

In at least some embodiments, the axial optical sensing sub-unit maycomprise at least one axial sensor having an axial illuminatorconfigured to transmit the axial illumination and an axial detectorconfigured to detect the axial reflectance.

In at least some embodiments, the radial optical sensing sub-unit maycomprise at least one radial sensor having a radial illuminatorconfigured to transmit the radial illumination and a radial detectorconfigured to detect the radial reflectance.

In at least some embodiments, the radial optical sensing sub-unit maycomprise three radial sensors, the radial illuminator and the radialdetector of a given radial sensor are disposed approximately 60 degreesfrom each other along a circumference of the radial wall.

In at least some embodiments, the radial optical sensing sub-unitfurther comprises four radial sensors, each radial sensor beingpositioned substantially equidistant from each other along acircumference of the radial wall.

In at least some embodiments, the axial optical sensing sub-unit maycomprise a first axial sensor located proximal to the first end of theingestible device, the first axial sensor configured to transmit a firstaxial illumination towards the environment and to detect a first axialreflectance from the environment resulting from the first axialillumination; and a second axial sensor located proximal to the secondend of the ingestible device, the second axial sensor configured totransmit a second axial illumination towards the environment and todetect a second axial reflectance from the environment resulting fromthe second axial illumination, the second axial illumination being in asubstantially opposite direction from the first axial illumination.

In at least some embodiments, the radial optical sensing sub-unit maycomprise a first radial sensor located proximal to a first wall portionof the radial wall, the first radial sensor configured to transmit afirst radial illumination towards the environment and to detect a firstradial reflectance from the environment resulting from the first radialillumination; and a second radial sensor located proximal to a secondwall portion of the radial wall, the second radial sensor configured totransmit a second radial illumination towards the environment and todetect a second radial reflectance from the environment resulting fromthe second radial illumination, the second wall portion being spacedfrom the first wall portion by at least 60 degrees along a circumferenceof the radial wall, and the second radial illumination being in adifferent radial direction from the first radial illumination.

In at least some embodiments, the first wall portion may be spaced fromthe second wall portion by approximately 180 degrees along thecircumference of the radial wall.

In at least some embodiments, the radial optical sensing sub-unit mayfurther comprise a third radial sensor located proximal to a third wallportion of the radial wall, the third radial sensor configured totransmit a third radial illumination towards the environment and todetect a third radial reflectance from the environment resulting fromthe third radial illumination, the third wall portion being spaced fromeach of the first wall portion and the second wall portion byapproximately 60 degrees along the circumference of the radial wall, andthe third radial illumination being in another different radialdirection from the first radial illumination and the second radialillumination.

In at least some embodiments, the axial optical sensing sub-unit maycomprise an infrared Light-Emitting Diode (LED).

In at least some embodiments, the radial optical sensing sub-unit maycomprise a LED emitting light having a wavelength of approximately 571nm.

In at least some embodiments, the radial optical sensing sub-unit maycomprise a RGB LED package.

In at least some embodiments, the housing is capsule-shaped.

In some aspects, a method for identifying a location within a GI tractof a body is provided herein. The method including: using an ingestibledevice comprising: a housing having a first end, a second endsubstantially opposite from the first end, and a radial wall extendinglongitudinally from the first end to the second end; and a sensing unitinside the housing, the sensing unit including: an axial optical sensingsub-unit located proximal to at least one of the first end and thesecond end, the axial optical sensing sub-unit being configured totransmit an axial illumination towards an environment external to thehousing and to detect an axial reflectance from the environmentresulting from the axial illumination; and a radial optical sensingsub-unit located proximal to the radial wall, the radial optical sensingsub-unit being configured to transmit a radial illumination towards theenvironment external to the housing and to detect a radial reflectancefrom the environment resulting from the radial illumination, the radialillumination being substantially perpendicular to the axialillumination; and operating a processing module to identify the locationbased on at least the detected radial and axial reflectance.

The ingestible device may further be defined according to any of theteachings herein.

In some aspects, a system for identifying a location within the GI tractof a body is provided herein. The system includes: an ingestible deviceincluding: a housing having a first end, a second end substantiallyopposite from the first end, and a radial wall extending longitudinallyfrom the first end to the second end; and a sensing unit inside thehousing, the sensing unit including: an axial optical sensing sub-unitlocated proximal to at least one of the first end and the second end,the axial optical sensing sub-unit being configured to transmit an axialillumination towards an environment external to the housing and todetect an axial reflectance from the environment resulting from theaxial illumination; and a radial optical sensing sub-unit locatedproximal to the radial wall, the radial optical sensing sub-unit beingconfigured to transmit a radial illumination towards the environmentexternal to the housing and to detect a radial reflectance from theenvironment resulting from the radial illumination, the radialillumination being substantially perpendicular to the axialillumination; and a processing module configured to identify thelocation of the ingestible device based on at least the radial and axialreflectance detected during transit within the body.

The ingestible device may further be defined according to any one of theteachings herein.

In some aspects, another method for identifying a location within the GItract of a body is provided herein. The method including: providing aningestible device having a sensing unit to collect reflectance data, thesensing unit including: an axial optical sensing sub-unit operable totransmit an axial illumination towards an environment external to theingestible device and to detect an axial reflectance from theenvironment resulting from the axial illumination; and a radial opticalsensing sub-unit operable to transmit a radial illumination towards theenvironment external to the ingestible device and to detect a radialreflectance from the environment resulting from the radial illumination,the radial illumination being substantially perpendicular to the axialillumination; operating the sensing unit to collect, at least, areflectance data series as the ingestible device transits through thebody, the reflectance data series comprising an axial reflectance dataseries and a radial reflectance data series, each of the axialreflectance data series and the radial reflectance data series includingone or more reflectance values corresponding to the respective axialreflectance and radial reflectance detected by the sensing unit duringat least a portion of the transit; and operating a processing module toidentify the location using the reflectance data series, the processingmodule being in electronic communication with the sensing unit, theprocessing module being configured to: determine a quality of theenvironment external to the ingestible device based on the axialreflectance data series and the radial reflectance data series; andindicate the location based on the determined quality of the environmentexternal to the ingestible device.

In at least some embodiments, determining the quality of the environmentexternal to the ingestible device based on each of the axial reflectancedata series and the radial reflectance data series may comprise:generating an axial standard deviation for the axial reflectance dataseries and a radial standard deviation for the radial reflectance dataseries; determining whether each of the axial standard deviation and theradial standard deviation satisfies a corresponding deviation threshold;and in response to determining the axial standard deviation and theradial standard deviation satisfy the deviation threshold, defining thequality of the environment as homogenous.

In at least some embodiments, the deviation threshold may comprise anaxial deviation threshold for the axial reflectance data series and aradial deviation threshold for the radial reflectance data series, theradial deviation threshold having a different value from the axialdeviation threshold.

In at least some embodiments, in response to determining that the axialstandard deviation and the radial standard deviation satisfy thedeviation threshold and prior to defining the quality of the environmentas homogenous, the method may further comprise: generating an axialaverage from a portion of the axial reflectance data series and a radialaverage from a portion of the radial reflectance data series;determining whether the radial average is less than the axial average;and in response to determining the radial average is less than the axialaverage, defining the quality of the environment as homogenous.

In at least some embodiments, determining whether the radial average isless than the axial average may comprise determining whether the radialaverage is less than the axial average by a minimum difference value.

In at least some embodiments, generating the axial average from theportion of the axial reflectance data series and the radial average fromthe portion of the radial reflectance data series may comprise selectinga number of reflectance values from each of the axial reflectance dataseries and the radial reflectance data series, the number of reflectancevalues being selected from a most recent portion of the respective axialreflectance data series and the radial reflectance data series.

In at least some embodiments, the sensing unit may further comprise atemperature sensor for collecting a temperature data series as theingestible device transits through the body; and prior to associatingthe quality of the environment as homogenous, the method may furthercomprise: determining whether a portion of the temperature data seriesincludes a temperature change exceeding a temperature threshold; and inresponse to determining the portion of the temperature data series doesnot include the temperature change exceeding the temperature threshold,associating the quality of the environment as homogenous.

In at least some embodiments, the processing module may be operated toindicate the location is the small intestine in response to determiningthe quality of the environment external to the ingestible device ishomogenous.

In some aspects, another ingestible device for identifying a locationwithin the GI tract of a body is provided herein. The ingestible devicemay include a sensing unit configured to collect reflectance data, thesensing unit including: an axial optical sensing sub-unit operable totransmit an axial illumination towards an environment external to theingestible device and to detect an axial reflectance from theenvironment resulting from the axial illumination; and a radial opticalsensing sub-unit operable to transmit a radial illumination towards theenvironment external to the ingestible device and to detect a radialreflectance from the environment resulting from the radial illumination,the radial illumination being substantially perpendicular to the axialillumination; wherein a processing module is configured to: operate thesensing unit to collect, at least, a reflectance data series as theingestible device transits through the body, the reflectance data seriescomprising an axial reflectance data series and a radial reflectancedata series, each of the axial reflectance data series and the radialreflectance data series including one or more reflectance valuescorresponding to the respective axial reflectance and radial reflectancedetected by the sensing unit during at least a portion of the transit;determine a quality of the environment external to the ingestible devicebased on the axial reflectance data series and the radial reflectancedata series; and indicate the location based on the determined qualityof the environment external to the ingestible device.

The processing module may be configured to perform at least one of themethods in accordance with the teachings herein.

In at least some embodiments, the processing module may be an externalprocessing module and the device may further comprise a communicationmodule in electronic communication with the external processing module.

In at least some embodiments, the processing module may be locatedwithin the device.

In some aspects, another method for identifying a location within the GItract of a body is provided herein. The method includes: operating anaxial optical sensing sub-unit to transmit an axial illumination towardsan environment within the GI tract and to detect an axial reflectancefrom the environment resulting from the axial illumination; operating aradial optical sensing sub-unit to transmit a radial illuminationtowards the environment within the GI tract and to detect a radialreflectance from the environment resulting from the radial illumination,the radial illumination being substantially perpendicular to the axialillumination; and operating a processing module to identify the locationusing the detected axial reflectance and the detected radialreflectance, the processing module being configured to: determine aquality of the environment within the GI tract based on the detectedaxial reflectance and the detected radial reflectance; and indicate thelocation based on the determined quality of the environment within theGI tract.

In at least one embodiment, the method may further comprise collecting,at least, a reflectance data series over a period of time, thereflectance data series comprising an axial reflectance data series anda radial reflectance data series, each of the axial reflectance dataseries and the radial reflectance data series including one or morereflectance values corresponding to the respective axial reflectance andradial reflectance detected by the respective axial optical sensingsub-unit and the radial optical sensing sub-unit during the period oftime.

In at least one embodiment, determining the quality of the environmentwithin the GI tract based on the detected axial reflectance and thedetected radial reflectance may comprise generating an axial standarddeviation for the axial reflectance data series and a radial standarddeviation for the radial reflectance data series; determining whethereach of the axial standard deviation and the radial standard deviationsatisfies a corresponding deviation threshold; and in response todetermining the axial standard deviation and the radial standarddeviation satisfy the deviation threshold, defining the quality of theenvironment as homogenous.

In at least one embodiment, the deviation threshold may comprise anaxial deviation threshold for the axial reflectance data series and aradial deviation threshold for the radial reflectance data series, theradial deviation threshold having a different value from the axialdeviation threshold.

In at least one embodiment, the method may further comprise, in responseto determining that the axial standard deviation and the radial standarddeviation satisfy the deviation threshold and prior to defining thequality of the environment as homogenous:

generating an axial average from a portion of the axial reflectance dataseries and a radial average from a portion of the radial reflectancedata series; determining whether the radial average is less than theaxial average; and in response to determining the radial average is lessthan the axial average, defining the quality of the environment ashomogenous.

In at least one embodiment, determining whether the radial average isless than the axial average may comprise determining whether the radialaverage is less than the axial average by a minimum difference value.

In at least one embodiment, generating the axial average from theportion of the axial reflectance data series and the radial average fromthe portion of the radial reflectance data series may comprise selectinga number of reflectance values from each of the axial reflectance dataseries and the radial reflectance data series, the number of reflectancevalues being selected from a most recent portion of the respective axialreflectance data series and the radial reflectance data series.

In at least one embodiment, the method may further comprise operating atemperature sensor to collect a temperature data series; and prior toassociating the quality of the environment as homogenous, the methodfurther comprises determining whether a portion of the temperature dataseries includes a temperature change exceeding a temperature threshold;and in response to determining the portion of the temperature dataseries does not include the temperature change exceeding the temperaturethreshold, associating the quality of the environment as homogenous.

In at least one embodiment, the processing module may be operated toindicate the location is the small intestine in response to determiningthe quality of the environment within the GI tract is homogenous.

In some aspects, a computer readable medium having a plurality ofinstructions executable on a processing module of a device for adaptingthe device to implement any of the methods of identifying a locationwithin the GI track of a body as described is provided herein.

In some aspects, another method for determining a location of aningestible device within a gastrointestinal tract of a body is providedherein. The method includes: transmitting a first illumination at afirst wavelength towards an environment external to a housing of theingestible device; detecting a first reflectance from the environmentresulting from the first illumination, and storing a first reflectancevalue in a first data set, wherein the first reflectance value isindicative of an amount of light in the first reflectance; transmittinga second illumination at a second wavelength towards an environmentexternal to the housing of the ingestible device, wherein the secondwavelength is different than the first wavelength; detecting a secondreflectance from the environment resulting from the second illumination,and storing a second reflectance value in a second data set, wherein thesecond reflectance value is indicative of an amount of light in thesecond reflectance; identifying a state of the ingestible device,wherein the state is a known or estimated location of the ingestibledevice; and determining a change in the location of the ingestibledevice within the gastrointestinal tract of the body by detectingwhether a state transition has occurred, the state transition detectedby comparing the first data set to the second data set.

In some embodiments, comparing the first data set to the second data setcomprises taking a difference between the first reflectance value storedin the first data set, and the second reflectance value stored in thesecond data set.

In some embodiments, comparing the first data set to the second data setcomprises integrating at least one of (i) the difference betweenreflectance values stored in the first data set and reflectance valuesstored in the second data set, or (ii) the difference between a movingaverage of the first data set and a moving average of the second dataset.

In some embodiments, comparing the first data set and the second dataset comprises taking a first mean from reflectance values stored in thefirst data set, taking a second mean from reflectance values stored inthe second data set, and taking a difference between the first mean andthe second mean.

In some embodiments, comparing the first data set and the second dataset comprises incrementing a counter when the mean of the first data setless a multiple of the standard deviation of the first data set isgreater than a mean of the second data set plus a multiple of thestandard deviation of the second data set.

In some embodiments, the first wavelength is in at least one of a redand an infrared spectrum, and the second wavelength is in at least oneof a blue and a green spectrum.

In some embodiments, the identified state is a stomach, and wherein whenthe comparing indicates that the first data set and the second data sethave diverged in a statistically significant manner, a state transitionhas occurred, wherein the state transition is a pyloric transition.

In some embodiments, the identified state is a duodenum, and whereinwhen the comparing indicates that a difference between the first dataset and the second data set is constant in a statistically significantmanner, a state transition has occurred, wherein the state transition isa treitz transition.

In some embodiments, the first wavelength is in an infrared spectrum,and the second wavelength is in at least one of a green and a bluespectrum.

In some embodiments, the identified state is a jejunum, and wherein whenthe comparing indicates that the first data set and the second data sethave converged in a statistically significant manner, a state transitionhas occurred, wherein the state transition is an ileocaecal transition.

In some embodiments, the first wavelength is in a red spectrum, and thesecond wavelength is in at least one of a green and a blue spectrum.

In some embodiments, the identified state is a caecum, and wherein whenthe comparing indicates that the first data set and the second data sethave converged in a statistically significant matter, a state transitionhas occurred, wherein the state transition is a caecal transition.

In some embodiments, the method further comprises measuring atemperature change of the environment external to the housing of theingestible device.

In some embodiments, the identified state is external to the body, andwherein the measured temperature change is above a threshold, a statetransition has occurred, wherein the state transition is entering thestomach.

In some embodiments, the identified state is a large intestine, andwherein the measured temperature change is above a threshold, a statetransition has occurred, wherein the state transition is exiting thebody.

In some embodiments, the method further comprises: deactivating afunction of the ingestible device for a predetermined period of timeafter detecting whether a state transition has occurred; reactivatingthe function of the ingestible device after the predetermined period oftime; transmitting a third illumination at the first wavelength towardsan environment external to a housing of the ingestible device; detectinga third reflectance from the environment resulting from the thirdillumination, and storing a third reflectance value in the first dataset, wherein the third reflectance value is indicative of an amount oflight detected by the ingestible device from the third reflectance;transmitting a fourth illumination at the second wavelength towards anenvironment external to the housing of the ingestible device; detectinga fourth reflectance from the environment resulting from the fourthillumination, and storing a fourth reflectance value in the second dataset, wherein the fourth reflectance value is indicative of an amount oflight detected by the ingestible device from the fourth reflectance;identifying the state of the ingestible device; and determining a changein the location of the ingestible device within the gastrointestinaltract of the body by detecting whether the state transition hasoccurred, the state transition detected by comparing the first data setto the second data set.

In some embodiments, the state of the ingestible device is selected fromone of: external to the body; stomach; pylorus; small intestine;duodenum; jejunum; ileum; large intestine; caecum; and colon.

In some embodiments, the state transition is selected from one of:entering the body; entering the stomach; pyloric transition; treitztransition; ileocecal transition; caecal transition; and exiting thebody.

In some aspects, another ingestible device is provided herein a housingdefined by a first end, a second end opposite from the first end, and aradial wall extending longitudinally from the first end to the secondend; a sensing unit inside the housing, the sensing unit comprising: afirst optical sensing sub-unit configured to transmit a firstillumination towards an environment external to the housing at a firstwavelength, and to detect a first reflectance from the environmentresulting from the first illumination; a second optical sensing sub-unitconfigured to transmit a second illumination towards an environmentexternal to the housing at a second wavelength, wherein the secondwavelength is different than the first wavelength, and to detect asecond reflectance from the environment resulting from the secondillumination; and a processing module located within the ingestibledevice configured to: store a first reflectance value in a first dataset, wherein the first reflectance value is indicative of an amount oflight detected by the device from the first reflectance; store a secondreflectance value in a second data set, wherein the second reflectancevalue is indicative of an amount of light detected by the device fromthe second reflectance; identify a state of the device, wherein thestate is a known or estimated location of the ingestible device; anddetermine a change in the location of the ingestible device within thegastrointestinal tract of the body by detecting whether a statetransition has occurred, the state transition detected by comparing thefirst data set to the second data set.

In some embodiments, the ingestible device may further be definedaccording to any one of the teachings herein.

In some embodiments, another system for determining a location of aningestible device within a gastrointestinal tract of a body is providedherein. The system comprises means for transmitting a first illuminationat a first wavelength towards an environment external to a housing ofthe ingestible device; means for detecting a first reflectance from theenvironment resulting from the first illumination, and means for storinga first reflectance value in a first data set, wherein the firstreflectance value is indicative of an amount of light in the firstreflectance; means for transmitting a second illumination at a secondwavelength towards an environment external to the housing of theingestible device, wherein the second wavelength is different than thefirst wavelength; means for detecting a second reflectance from theenvironment resulting from the second illumination, and means forstoring a second reflectance value in a second data set, wherein thesecond reflectance value is indicative of an amount of light in thesecond reflectance; means for identifying a state of the ingestibledevice, wherein the state is a known or estimated location of theingestible device; and means for determining a change in the location ofthe ingestible device within the gastrointestinal tract of the body bydetecting whether a state transition has occurred, the state transitiondetected by comparing the first data set to the second data set.

In some embodiments, the system may be further defined according to anyone of the teaching herein.

In some aspects, another method for sampling the gastrointestinal tractwith an ingestible device is provided herein. The method includestransmitting a first illumination at a first wavelength towards anenvironment external to a housing of the ingestible device; detecting afirst reflectance from the environment resulting from the firstillumination; transmitting a second illumination at a second wavelengthtowards an environment external to the housing of the ingestible device;detecting a second reflectance from the environment resulting from thesecond illumination; determining a location of the ingestible devicewithin the gastrointestinal tract of the body based on the firstreflectance and the second reflectance; and sampling thegastrointestinal tract when the determined location matches apredetermined location.

In some embodiments, sampling the gastrointestinal tract comprisesmoving a portion of the housing of the ingestible device from anorientation that does not allow a sample from the gastrointestinal tractto enter a sample chamber, to an orientation that allows the sample toenter the sample chamber.

In some embodiments, the method further comprises determining an amountof time after the sampling the gastrointestinal tract; and resamplingthe gastrointestinal tract when the determined amount of time is greaterthan a threshold value.

In some embodiments, the method further comprises determining a secondlocation of the ingestible device within the gastrointestinal tractbased on a detected third reflectance; and resampling thegastrointestinal tract when the determined location matches a secondpredetermined location.

In some embodiments, resampling the gastrointestinal tract comprisesmoving a portion of the housing of the ingestible device from anorientation that does not allow a second sample from thegastrointestinal tract to enter a second sample chamber, to anorientation that allows the second sample to enter the second samplechamber.

In some aspects, another ingestible device is provided herein. Theingestible device includes a housing defined by a first end, a secondend opposite from the first end, and a radial wall extendinglongitudinally from the first end to the second end; a sampling chamberlocated proximal to the housing; a sensing unit inside the housing, thesensing unit comprising: a first optical sensing sub-unit configured totransmit a first illumination towards an environment external to thehousing at a first wavelength, and to detect a first reflectance fromthe environment resulting from the first illumination; a second opticalsensing sub-unit configured to transmit a second illumination towards anenvironment external to the housing at a second wavelength, and todetect a second reflectance from the environment resulting from thesecond illumination; a processing module located within the ingestibledevice configured to: determine a location of the ingestible devicewithin the gastrointestinal tract of the body based on the firstreflectance and the second reflectance; and sampling thegastrointestinal tract when the identified location matches apredetermined location by actuating at least one of a portion of thehousing and the sampling chamber.

In some embodiments, the ingestible device may be further definedaccording to any one of the teaching herein.

In some aspects, another system for sampling the gastrointestinal tractwith an ingestible device is provided herein. The system includes meansfor transmitting a first illumination at a first wavelength towards anenvironment external to a housing of the ingestible device; means fordetecting a first reflectance from the environment resulting from thefirst illumination; means for transmitting a second illumination at asecond wavelength towards an environment external to the housing of theingestible device; means for detecting a second reflectance from theenvironment resulting from the second illumination; means fordetermining a location of the ingestible device within thegastrointestinal tract of the body based on the first reflectance andthe second reflectance; and means for sampling the gastrointestinaltract when the determined location matches a predetermined location.

In some embodiments, the system may be further defined according to anyone of the teachings herein.

In some aspects, another method for releasing a substance into thegastrointestinal tract with an ingestible device is provided herein. Themethod includes transmitting a first illumination at a first wavelengthtowards an environment external to a housing of the ingestible device;detecting a first reflectance from the environment resulting from thefirst illumination; transmitting a second illumination at a secondwavelength towards an environment external to the housing of theingestible device; detecting a second reflectance from the environmentresulting from the second illumination; determining a location of theingestible device within the gastrointestinal tract of the body based onthe first reflectance and the second reflectance; and releasing thesubstance into the gastrointestinal tract when the determined locationmatches a predetermined location.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects and advantages will become apparent withconsideration of the following detailed description, taken inconjunction with the accompanying drawings, in which like referencecharacters refer to like parts throughout, and in which:

FIG. 1A is a view of an example embodiment of an ingestible device.

FIG. 1B is an exploded view of the ingestible device of FIG. 1A.

FIG. 2A is an example block diagram of the electrical components thatmay be used for the ingestible device of FIG. 1A.

FIGS. 2B and 2C are an example embodiment of a circuit design that maybe used in the ingestible device of FIG. 1A.

FIG. 2D is a top view of a circuit design of a flexible PCB that may beused in the ingestible device of FIG. 1A.

FIG. 2E is a bottom view of the circuit design of FIG. 2D.

FIGS. 3A and 3B are diagrams of an example sensor configuration for aningestible device.

FIGS. 4A and 4B are diagrams of another example sensor configuration foran ingestible device.

FIGS. 5A and 5B are diagrams of a further example sensor configurationfor an ingestible device.

FIGS. 6A and 6B are diagrams of yet another example sensor configurationfor an ingestible device.

FIGS. 7A to 7C illustrate diagrams of the ingestible device of FIG. 3Ain an example operation.

FIG. 8A is a cross-sectional view of an example embodiment of aningestible device showing regions for transmitted and detected lightthat may be possible during operation.

FIGS. 8B and 8C are diagrams of the ingestible device of FIG. 8A in anexample operation.

FIG. 9A is a flowchart of an example embodiment of a method of operationfor the ingestible device described herein.

FIG. 9B is a flowchart of an example embodiment of a method ofdetermining a quality of an environment external to the ingestibledevice described herein.

FIGS. 10A to 10C are diagrams of the ingestible device of FIG. 3A duringan example transit through an individual's gastrointestinal (GI) tract.

FIGS. 11A to 11C are diagrams of the ingestible device of FIG. 4A duringan example transit through an individual's GI tract.

FIGS. 12A to 12C are diagrams of the ingestible device of FIG. 5A duringan example transit through an individual's GI tract.

FIGS. 13A to 13C are plots illustrating data collected during exampleoperations of the ingestible device of FIG. 3A.

FIG. 14A is an exploded view of another example embodiment of aningestible device.

FIG. 14B is a cross-sectional view of the ingestible device of FIG. 14A.

FIG. 15 is an example block diagram of electrical components that may beused for the ingestible device of FIG. 14A.

FIG. 16 is a flowchart of an example embodiment of a method of operationfor the ingestible device of FIG. 14A.

FIGS. 17A to 17C are different views of an example embodiment of a basestation that may be used with an ingestible device.

FIGS. 18A to 18C are screenshots of example embodiments of userinterfaces for interacting with the ingestible devices described herein.

FIG. 19 is a view of another example embodiment of an ingestible device.

FIG. 20 is a simplified top view and side view of the device in FIG. 19.

FIG. 21 describes how wavelengths of light used in some embodiments ofthe device interact with different environments.

FIG. 22 describes the reflection properties of different regions of thegastrointestinal tract as they relate to the device.

FIG. 23 describes how different types of reflected light may be detectedin different regions of the gastrointestinal tract.

FIG. 24 describes reflectances measured in different regions of thegastrointestinal tract, and a process for localizing the device.

FIG. 25 is an external view of another embodiment of the ingestibledevice that may be used for sampling the gastrointestinal tract orreleasing medicament.

FIG. 26 is an exploded view of the ingestible device of FIG. 25.

FIG. 27 describes major electrical sub-units corresponding to someembodiments of the device.

FIG. 28 describes the firmware corresponding to some embodiments of thedevice.

FIG. 29 is a flowchart that describes “Fast Loop” operation of thedevice, which may allow for high speed processing at short intervals, inaccordance with some embodiments of the device.

FIGS. 30A and 30B depict a flowchart that describes “Slow Loop”operation of the device, in accordance with some embodiments of thedevice.

FIG. 31 is a flowchart that describes the operating states of the devicein an example application, in accordance with some embodiments of thedevice.

FIG. 32 is a flowchart describing a caecum detection algorithm used insome embodiments of the device.

FIG. 33 is a flowchart describing a duodenum detection algorithm used insome embodiments of the device.

FIG. 34 is data from an ingestible device administered to a patientduring a trial.

FIG. 35 is a color map, showing the changing levels of reflected lightdetected by the device in thirteen different trials.

DESCRIPTION

Various systems, devices, and methods are described herein to provide anexample of at least one embodiment for the claimed subject matter. Noembodiment limits any claimed subject matter and any claimed subjectmatter may cover systems, devices, and methods that differ from thosedescribed herein. It is possible that the claimed subject matter are notlimited to systems, devices, and methods having all of the features ofany one systems, devices, and methods described herein or to featurescommon to multiple or all of the systems, devices, and methods describedherein. It may be possible that a system, device, or method describedherein is not an embodiment of any claimed subject matter. Any subjectmatter disclosed in systems, devices, and methods described herein thatis not claimed in this document may be the subject matter of anotherprotective instrument, for example, a continuing patent application, andthe applicants, inventors or owners do not intend to abandon, disclaimor dedicate to the public any such subject matter by its disclosure inthis document.

It will be appreciated that, for simplicity and clarity of illustration,where considered appropriate, reference numerals may be repeated amongthe figures to indicate corresponding or analogous elements. Inaddition, numerous specific details are set forth in order to provide athorough understanding of the embodiments described herein. However, itwill be understood by those of ordinary skill in the art that theembodiments described herein may be practiced without these specificdetails. In other instances, well-known methods, procedures andcomponents have not been described in detail so as not to obscure theembodiments described herein. Also, the description is not to beconsidered as limiting the scope of the embodiments described herein.

It should be noted that terms of degree such as “substantially”, “about”and “approximately” when used herein mean a reasonable amount ofdeviation of the modified term such that the end result is notsignificantly changed. These terms of degree should be construed asincluding a deviation of the modified term if this deviation would notnegate the meaning of the term it modifies.

In addition, as used herein, the wording “and/or” is intended torepresent an inclusive-or. That is, “X and/or Y” is intended to mean Xor Y or both, for example. As a further example, “X, Y, and/or Z” isintended to mean X or Y or Z or any combination thereof.

As used herein, the term “coupled” indicates that two elements can bedirectly coupled to one another or coupled to one another through one ormore intermediate elements.

As used herein, the term “body” refers to the body of a patient, asubject or an individual who receives the ingestible device. The patientor subject is generally a human or other animal.

The various embodiments described herein generally relate to aningestible device for identifying one or more locations within thegastrointestinal (GI) tract and, in some embodiments, for collectingdata and/or releasing substances including medicaments and therapeuticsat the identified location. As used herein, the term “gastrointestinaltract” or “GI tract” refers to all portions of an organ systemresponsible for consuming and digesting foodstuffs, absorbing nutrients,and expelling waste. This includes orifices and organs such as themouth, throat, esophagus, stomach, small intestine, large intestine,rectum, anus, and the like, as well as the various passageways andsphincters connecting the aforementioned parts.

As used herein, the term “reflectance” refers to a value derived fromlight emitted by the device, reflected back to the device, and receivedby a detector in or on the device. For example, in some embodiments thisrefers to light emitted by the device, wherein a portion of the light isreflected by a surface external to the device, and the light is receivedby a detector located in or on the device.

As used herein, the term “illumination” refers to any electromagneticemission. In some embodiments, an illumination may be within the rangeof Infrared Light (IR), the visible spectrum and ultraviolet light (UV),and an illumination may have a majority of its power centered at aparticular wavelength in the range of 100 nm to 1000 nm. In someembodiments, it may be advantageous to use an illumination with amajority of its power limited to one of the infrared (750 nm-1000 nm),red (620 nm-750 nm), green (495 nm-570 nm), blue (450 nm-495 nm), orultraviolet (100 nm-400 nm) spectrums. In some embodiments a pluralityof illuminations with different wavelengths may be used.

Referring now to FIG. 1A, shown therein is a view of an exampleembodiment of an ingestible device 10 in which a portion of the housing12 of the ingestible device 10 has been removed. The ingestible device10 may be used for autonomously identifying a location within the body,such as a portion of the gastrointestinal tract. In some embodiments,the ingestible device 10 can discern whether it is located in thestomach, the small intestine, or the large intestine. In someembodiments the ingestible device may also be able to discern whatportion of the small intestine it is located in, such as the duodenum,the jejunum or the ileum. The ingestible device 10 may generally be inthe shape of a capsule, like a conventional pill. Accordingly, the shapeof the ingestible device 10 provides for easy ingestion and is familiarto healthcare practitioners and patients.

Unlike a conventional pill, the ingestible device 10 is designed towithstand the chemical and mechanical environment of the GI tract (e.g.,effects of muscle contractile forces and concentrated hydrochloric acidin the stomach). However, unlike other devices that are intended to stayinside a patient's body (e.g., medical implants), the ingestible device10 may be designed to travel temporarily within the body. Accordingly,the regulatory rules governing the materials and manufacture of theingestible device 10 may be less strict than those for the devices thatare intended to stay inside the body. Nevertheless, because theingestible device 10 enters the body, the materials used to manufacturethe ingestible device 10 are generally selected to at least comply withthe standards for biocompatibility (e.g., ISO 10993). Furthermore,components inside the ingestible device 10 are free of any restrictedand/or toxic metals and are lead-free pursuant to the Directive2002/95/EC of the European Parliament, which is also known as theRestriction of Hazardous Substances (RoHS).

There is a broad range of materials that may be used for manufacturingthe ingestible device 10. Different materials may be used for each ofthe different components of the ingestible device 10. Examples of thesematerials include, but are not limited to, thermoplastics,fluoropolymers, elastomers, stainless steel and glass complying with ISO10993 and USP Class VI specifications for biocompatibility; and anyother suitable materials and combinations thereof. In certainembodiments, these materials may further include liquid silicone rubbermaterial with a hardness level of 10 to 90 as determined using adurometer (e.g., MED-4942™ manufactured by NuSil™), a soft biocompatiblepolymer material such as, but not limited to, polyvinyl chloride (PVC),polyethersulfone (PES), polyethylene (PE), polyurethane (PU) orpolytetrafluoroethylene (PTFE), and a rigid polymer material coated witha biocompatible material that is soft or pliable (e.g., a poly(methylmethacrylate) (PMMA) material coated with silicone polymer). Use ofdifferent materials for different components may enablefunctionalization of certain surfaces for interaction with proteins,antibodies, and other biomarkers. For example, Teflon® may be used as amaterial in the ingestible device 10 for movable components in order toreduce friction between these components. Other example materials mayinclude other materials commonly used in micro-fabrication, such aspolydimethylsiloxane (PDMS), borosilicate glass, and/or silicon.Although we may refer to specific materials being used to construct thedevice for illustrative purposes, the materials recited are not intendedto be limiting, and one skilled in the art may easily adapt the deviceto use any number of different materials without affecting the overalloperation or functionality of the device.

In some embodiments, the housing 12 of the ingestible device 10 may bemanufactured from a type of plastic, such as a photosensitive acrylicpolymer material or an inert polycarbonate material. The housing 12 mayalso be formed using material that can be sterilized by chemicals.

The housing 12 may be formed by coupling two enclosure portionstogether. For example, the two enclosure portions can be mated and fusedtogether with an adhesive material, such as a cyanoacrylate variant. Thehousing 12, in effect, protects the interior of the ingestible device 10from its external environment and also protects the external environment(e.g., the gastrointestinal tract) from components inside the ingestibledevice 10.

Furthermore, the ingestible device 10 may include one or more additionallayers of protection. The additional protection may protect a patient orindividual against adverse effects arising from any structural problemsassociated with the housing 12 (e.g., the two enclosure portions fallingapart or a fracture developing in the housing 12). For example, a powersupply inside the ingestible device 10 may be coated with an inert andpliable material (e.g., a thin layer of silicone polymer) so that onlyelectrical contacts on the power supply are exposed. This additionalprotection to the power supply may prevent chemicals inside theingestible device 10 from seeping into the patient's body.

In some embodiments, a surface of the ingestible device 10 and surfacesof the different components in the ingestible device 10 may receivedifferent treatments that vary according to an intended use of theingestible device 10. For example, the surface of the ingestible device10 may receive plasma activation for increasing hydrophilic behavior. Inanother example, for minimizing cross-contamination in the collectedsamples and/or substances for release, certain storage components thatmay come into contact with these samples and/or substances may receivehydrophilic treatment while certain other components may receivehydrophobic treatments.

The components of the ingestible device 10 may be too small and complexfor fabrication with conventional tools (e.g., lathe, manual millingmachines, drill-press, and the like) but too large for efficientconstruction using microfabrication techniques. Fabrication techniquesthat fall between the conventional and microfabrication techniques maybe used which include, but are not limited to, 3D printing (e.g., Multijet Modeling (MJM) of 3D mechanical computer-aided design (CAD).Software packages by SolidWorks™ and/or Alibr™ are examples of CADsoftware that may be used to design certain components of the ingestibledevice 10, although any suitable CAD software may be used.

In some embodiments, components of the ingestible device 10 may befabricated using different conventional manufacturing techniques such asinjection molding, computer numerical control (CNC) machining and byusing multi-axial lathes. For example, the housing 12 of the ingestibledevice 10 may be fabricated from CNC machined polycarbonate material andthe storage component may be fabricated by applying a biocompatiblematerial, such as silicone polymer, to a 3D-printed mold or cast.

Silicone polymer can provide certain advantages to the fabricationprocess of the ingestible device 10. For instance, components in theingestible device 10 that are formed using the silicone polymer materialcan be fabricated using conventional methods, such as moldingtechniques. Silicone polymer material is also a pliable material.Therefore, components of the ingestible device 10 that are formed fromsilicone polymer material can accommodate a range of design deviationsduring the manufacturing stage and can also be adapted for compressionfitting.

Referring still to FIG. 1A, the ingestible device 10 is illustrated inaccordance with an example embodiment. The ingestible device 10 includesthe housing 12 for providing an enclosure for various electronic andmechanical components. The housing 12 includes a first end portion 16 a,a second end portion 16 b, and a radial wall 14 extending from the firstend portion 16 a to the second end portion 16 b.

The radial wall 14 can be formed from one or more components. In theexample of FIG. 1A, the radial wall includes a first wall portion 14 a,a second wall portion 14 b and a connecting wall portion 14 c forconnecting the first wall portion 14 a with the second wall portion 14b. Other configurations of the radial wall 14 may be used depending onthe application of the ingestible device 10.

Referring now to FIG. 1B, shown therein is an exploded view of thecomponents of the ingestible device 10 in one example embodiment. Asshown in FIGS. 1A and 1B, enclosed within the first wall portion 14 aare a printed circuit board (PCB) 30, a battery 18, a sensing sub-unit32, 42, and a communication sub-unit 120. The various components withinthe ingestible device 10 are described with reference to FIGS. 2A to 2E.

FIG. 2A is a block diagram 100 of an example embodiment of electricalcomponents that may be used for the ingestible device 10. As shown inthe block diagram 100, the ingestible device 10 may include amicrocontroller 110, a communication sub-unit 120, a sensing sub-unit130, a power supply 160, and a memory sub-unit 140. At least some of theelectronic components can be embedded on the PCB 30.

In some embodiments, the microcontroller 110 includes programming,control and memory circuits for holding and executing firmware orsoftware, and coordinating all functions of the ingestible device 10 andthe other peripherals embedded on the PCB 30. For example, themicrocontroller 110 may be implemented using a 32-bit microcontroller,such as the STM32 family of microcontrollers from STMicroelectronics™,although any suitable microcontroller may be used.

The microcontroller 110 provided in FIG. 2A may include a generalinput/output (I/O) interface 112, an SPI or a Universal AsynchronousReceiver/Transmitter (UART) interface 114, and an Analog-to-DigitalConverter (A/D Converter) 116. The microcontroller 110 may consider theA/D Converter 116 to be a peripheral device.

The general I/O interface 112 includes a fixed number of generalinput/output pins (GPIOs). These GPIOs may be grouped into groups of twoor three pins for implementing a variety of communication protocols,such as for example Single-Wire Interface (SWI), a two-wire interface(e.g., an Inter-Integrated Circuit or I²C) and/or a serial peripheralinterface (SPI). The groups of GPIOs that are delegated to thesecommunication protocols may serve as a bus for connecting themicrocontroller 110 with one or more peripheral devices.

Using any of the above listed communication protocols, or any othersuitable communication protocol, the microcontroller 110 may send aseries of requests to addresses associated with specific groups of GPIOsfor detecting which peripheral devices, if any, are present on the bus.If any of the peripheral devices are present on the bus, the peripheraldevice that is present returns an acknowledgement signal to themicrocontroller 110 within a designated time frame. If no response isreceived within this designated time frame, the peripheral device isconsidered absent.

The A/D Converter 116 can be coupled with any of the sensors in thesensing sub-unit 130. In some embodiments, the ingestible device 10 cancommunicate by receiving and/or transmitting infrared light, in whichcase an infrared (IR) sensitive phototransistor and a resistor coupledto the A/D converter 116 are included in the communication sub-unit 120.Additionally, in some embodiments ingestible device 10 may include aninfrared (IR) light emitting diode (LED) coupled to the microcontroller110 to communicate signals outside of the device.

In some embodiments, the communication sub-unit 120 can receiveoperating instructions from an external device, such as a base station(e.g., an infrared transmitter and/or receiver on a dock). The basestation may be used for initially programming the ingestible device 10with operating instructions and/or communicating with the ingestibledevice 10 during operation in real-time or after the ingestible device10 is retrieved from the body. In some embodiments, the communicationsub-unit 120 doesn't receive any operating instructions from an externaldevice, and instead the ingestible device 10 operates autonomously invivo.

In some embodiments, the communication sub-unit 120 can include anoptical encoder 20, such as an infrared emitter and receiver. The IRemitter and receiver can be configured to operate using modulatedinfrared light, i.e. light within a wavelength range of step 850 nm to930 nm. Furthermore, the IR receiver may be included in the ingestibledevice 10 for receiving programming instructions from the IR transmitterat the base station and the IR transmitter may be included in theingestible device 10 for transmitting data to the IR receiver at thebase station. Bidirectional IR communication between the ingestibledevice 10 and the base station can therefore be provided. It will beunderstood that other types of optical encoders or communicationsub-units can be used in some embodiments; for example, somecommunication sub-units may utilize Bluetooth, radio frequency (RF)communications, near field communications, and the like, rather than (orin addition to) optical signals.

The sensing sub-unit 130 can include various sensors to obtain in vivoinformation while the ingestible device 10 is in transit inside thebody. Various sensors, such as radial sensors 32 and axial sensors 42,can be provided at different locations of the ingestible device 10 tohelp identify where the ingestible device 10 may be within the body. Insome embodiments, the data provided by the sensors 32, 42 can be usedfor triggering an operation of the ingestible device 10. For example, insome embodiments the ingestible device 10 may be adapted to include asampling chamber capable of taking samples from the gastrointestinaltract from the area surrounding the device, and data provided by sensors32, 42 may trigger the device to obtain a sample. Each sensor 32, 42 caninclude an illuminator, 32 i and 42 i, and a detector, 32 d and 42 d.The sensors 32, 42 are described further with reference to FIGS. 3A to8C. As another example, in some embodiments the ingestible device 10 maybe adapted to deliver a substance, including medicaments andtherapeutics, and data provided by the sensors 32, 34 may trigger thedevice to deliver the substance.

The memory sub-unit 140 can be provided with a memory storage component142, such as a flash storage, EEPROM, and the like. The memory sub-unit140 can be used to store the instructions received from the base stationand to store various other operational data, such as transit data andsensor data collected by the sensing sub-unit 130. In some embodiments,the microcontroller 110 can operate to execute the instructions storedat the memory sub-unit 140, which may involve operating other componentsof the ingestible device 10, such as the sensing sub-unit 130, thecommunication sub-unit 120 and the power supply 160.

In some embodiments, the power supply 160 can include one or morebatteries 18 formed from different chemical compositions, such aslithium polymer, lithium carbon, silver oxide, alkaline, and the like.This can be helpful in accommodating the different power requirements ofthe various components in the ingestible device 10. In some embodiments,the power supply 160 may include a silver oxide battery cell forsupplying power to the various components in the ingestible device 10.The battery cells that supply power to the power supply 160 may operateat 1.55V. For example, a silver oxide coin cell type battery, such asthose manufactured by Renata™, may be used since the silver oxide coincell battery has discharge characteristics that suit the operation ofthe ingestible device 10. In some embodiments, other types of batterycells may be used.

In some embodiments, it is possible for the power supply 160 to includeone or more battery cells. For example, multiple coin cells may be usedto provide higher voltage for the operation of the ingestible device. Itmay also be possible for the power supply 160 to include one or moredifferent types of battery cells.

Also, the power supply 160 may be split into one or more cell groups toprevent a temporary interruption or change at the power supply 160 fromaffecting the overall operation of the ingestible device 10. Forexample, an example power supply 160 can include three cells and eachcell is operable to provide 1.55 volts. In one example embodiment, thethree cells can be provided as one cell group operable to provide 4.65volts as the full voltage. A voltage regulator may control the voltagethat is provided by the cell group. The voltage regulator may operate toprovide a regulated voltage, such as 3.3 volts, to the microcontroller110, while operating to provide the full voltage to the sensing sub-unit130. In another example embodiment, the three cells can be provided astwo different cell groups, with a first cell group including two cellsand a second cell group including one cell. The first cell group,therefore, can provide 3.1 volts while the second cell group can beprovide 1.55 volts. The first cell group may be operable to provide 3.1volts to the microcontroller 110 to prevent voltage variations. Thefirst cell group and the second cell group can then be combined toprovide 4.65 volts to the sensing sub-unit 130.

The power supply 160 may, in some embodiments, include a magnetic switch162 for operating as an ‘ON’/‘OFF’ mechanism for the ingestible device10. When exposed to a strong magnetic field, the magnetic switch 162 canbe maintained in an ‘OFF’ position in which the ingestible device 10 isnot activated. The strong magnetic field can effectively stop currentflow in the ingestible device 10, causing an open circuit to occur. Forexample, this may prevent the ingestible device 10 from consuming energyand discharging the battery 18 before being administered to a patient.However, when the magnetic switch 162 is no longer exposed to a strongmagnetic field, the magnetic switch 162 may switch to an ‘ON’ positionto activate the ingestible device 10. Current may then flow through theelectrical pathways in the ingestible device 10 (e.g., pathways on thePCB 30).

In some embodiments, an MK24 reed sensor from MEDER™ Electronics may beused as the magnetic switch 162, although any suitable magnetic switchmay be used. For example, in some embodiments, the magnetic switch 162may be a magnetically actuated, normally closed, Single-Pole SingleThrow (SPST-NC) switch. In some embodiments, a micro-electromechanicalsystem (MEMS) magnetic switch, such as one manufactured by MEMSCAP™, maybe used as the magnetic switch 162. In some embodiments, the magneticswitch 162 may be a Hall effect sensor.

In some embodiments, the power supply 160 may be removed from theingestible device 10 to be recharged by recharging circuitry that isexternal to the ingestible device 10. In some embodiments, the powersupply 160 may be recharged while in the ingestible device 10 whenrecharging circuitry is included on the PCB 30; for example, byproviding circuitry that allows the ingestible device 10 to beinductively coupled to a base station and charged wirelessly.

FIG. 2B is an example circuit design 102 of some of the electricalcomponents of the ingestible device 10. It will be understood that thecircuit design 102 is merely an example and other configurations anddesigns may similarly be used. FIG. 2C is an example circuit design 104of the sensing sub-unit 130.

As noted above, some of the electronic components may be embedded on thePCB 30. FIGS. 2D and 2E illustrate a top view 106 t and a bottom view106 b, respectively, of a circuit design of a flexible PCB 30.

The PCB 30 may consist of flexible printed circuits. Flexible printedcircuits may maximize the utilization of space within the ingestibledevice 10 by enabling easier conformation to the dimensional constraintsof the ingestible device 10. Increased flexibility allows more twisting,bending, and shaping of the PCB or certain parts of the PCB, ultimatelyleading to a smaller pill that is more robust to vibrational ortorsional forces.

The PCB 30 in this example includes the communication sub-unit 120, themicrocontroller 110, the sensing sub-unit 130, and other peripheralcomponents that are described below. Electronic components located onthe PCB 30 are electrically coupled to other components with one or moreelectronic signal pathways, traces or tracks.

The flexible PCB 30 may be fabricated using a combination of a flexibleplastic material and a rigid material, such as a woven fiberglass clothmaterial, or any other suitable material. The resulting flexible PCB 30can therefore exhibit both a flexible quality and a rigid quality. Theflexible quality of the flexible PCB 30 enables the electroniccomponents located on the flexible PCB 30 to conform to the dimensionalconstraints of the ingestible device 10. In particular, as generallyillustrated in FIG. 1A, the flexible PCB 30 can be inserted into thefirst wall portion 14 a. At the same time, the rigid quality of theflexible PCB 30 enables reinforcement of areas that may be susceptibleto high levels of physical stress. For example, in some embodiments,contact terminals, such as 218 b, 218 b, that are used for connectingthe flexible PCB 30 to the power supply 160 may have addedreinforcement.

As illustrated in FIGS. 2D and 2E, the flexible PCB 30 includes one ormore separate, but connected, segments. For example, the flexible PCB 30may include a main PCB segment 202 and one or more smaller PCB segments204 such as smaller PCB segments 204 a and 204 b. The smaller PCBsegments 204 can be directly or indirectly connected to the main PCBsegment 202. The main PCB segment 202 may be rolled into a generallycylindrical shape to conform to the structural dimension of theingestible device 10.

As shown in FIG. 1B, the smaller PCB segments 204 a and 204 b may befolded into one or more overlapping layers and fitted into theingestible device 10. In some embodiments, the smaller PCB segments 204a and 204 b can be layered around the battery 18. It will be understoodthat the flexible PCB 30 may have different configurations, such asdifferent shapes and sizes, and/or a different number of segments.

The electronic components can be located on any one of the main PCBsegment 202 or the smaller PCB segments 204 a and 204 b. For example, asillustrated in FIGS. 2D and 2E, the main PCB segment 202 can include themicrocontroller 110, the magnetic switch 162 and the radial sensors 32.The smaller PCB segment 204 a can include the optical encoder 20 and theaxial sensors 42. The smaller PCB segments 204 a and 204 b can alsoinclude respective power supply contact terminals 218 a and 218 b forengaging the battery 18. In some embodiments, other arrangements ofthese components on the flexible PCB 30 are possible.

Referring again to FIG. 1A, the first end portion 16 a generallyencloses the components at the first wall portion 14 a of the ingestibledevice 10. The first end portion 16 a and the first wall portion 14 amay be fabricated with optically and radio translucent or transparentmaterial. This type of material allows for transmission and reception oflight, such as by the sensors 32, 42. In some embodiments, the first endportion 16 a and the first wall portion 14 a may be fabricated fromplastic.

In some embodiments, the sensing sub-unit 130 can be oriented orprovided with respect to the housing 12 in order to reduce any internalreflections resulting from an output of the sensing sub-unit 130. Forexample, the sensing sub-unit 130 can be oriented at a certain anglewith respect to a circumference of the housing 12 so that minimalinternal reflections are caused by the housing 12 when the output of thesensing sub-unit 130 reaches the housing 12. In some embodiments, atransition medium, such as certain oil-based substances, can be providedbetween the sensing sub-unit 130 and the housing 12 so that a refractiveindex of the transition medium and the sensing sub-unit 130 can matchthe refractive index of the housing 12, reducing reflections andscattering. In some embodiments the illuminator and detector of eachsensor (e.g., the illuminator 32 i and the detector 32 d of the sensor32) may be physically separated around the circumference of the device.For example, in the embodiments discussed in FIGS. 8A-8C, 19 and 20,separating the illuminator 32 i and the detector 32 d may further reduceinternal reflections.

In some embodiments, the sensing sub-unit 130 includes an axial sensingsub-unit 42 and a radial sensing sub-unit 32 at different locations ofthe ingestible device 10 to help estimate the location of the ingestibledevice 10 within the body. The ingestible device 10, 300 moves withinthe body at variable speeds. Within the gastrointestinal tract, forexample, the varying size, shape, and environments of the differenttract segments can make location identification difficult.

Referring now to FIGS. 3A and 3B, shown therein are diagrams of anexample ingestible device 300. FIGS. 3A and 3B generally illustrate anexample configuration of the sensors 332, 342 with respect to certaincomponents of the housing 12. FIG. 3A is a cross-sectional view 300A ofthe ingestible device 300 and FIG. 3B is a three-dimensional side view300B of the ingestible device 300.

The axial sensing sub-unit 42 is located proximally to at least one ofthe first end portion 16 a and the second end portion 16 b. As shown inFIG. 3A, the axial sensor 342 is located proximally to the first endportion 16 a. It will be understood that, depending on the structure ofthe ingestible device 300, the axial sensor 342 may be locatedproximally to the second end portion 16 b instead. The radial sensingsub-unit 32 is generally located proximally to the radial wall 14. Forexample, as shown in FIGS. 3A and 3B, the radial sensor 332 is locatedproximally to a portion of the radial wall 14.

An examplary transit of the ingestible device 300 is shown in FIGS. 10Ato 10C. The transit of the ingestible device 300 through a stomach 452,asmall intestine 454 and then, a large intestine 456 is shown generallyat 450A, 450B and 450C, respectively. The movement of the ingestibledevice 300 varies substantially depending on its location. The stomach452, as shown in FIG. 10A, is a large, open and cavernous organ, andtherefore the ingestible device 300 can have a relatively greater rangeof motion. On the other hand, the small intestine 454, as shown in FIG.10B, has a tube-like structure and the ingestible device 300 isgenerally limited to longitudinal motion. The large intestine 456,similar to the stomach 452, is a large and open structure, and theingestible device 300 can have a relatively greater range of motion ascompared to its transit through the small intestine 454. By providingthe axial sensing sub-unit 42 and the radial sensing sub-unit 32,different degrees and types of reflectance data are available dependingon the shape and/or size of the transit location. The varyingreflectance data is further described in FIGS. 13A, 13B and 13C.

In some embodiments, each axial sensor 342 and each radial sensor 332can include an illuminator for directing an illumination towards anenvironment external to the housing 12 and a detector for detectingreflectance from the environment resulting from the illumination. Theillumination can include any electromagnetic emission within the rangeof Infrared Light (IR), the visible spectrum and ultraviolet light (UV).An example operation of the sensors 342, 332 is described below withreference to FIGS. 7A to 7C.

FIGS. 7A to 7C illustrate the operation of axial sensor 342 and radialsensor 332 in different environments. In each of FIGS. 7A to 7C, theilluminators and detectors of the sensors 332 and 342 are shown for theingestible device 300. The axial sensor 342 includes an axialilluminator 342 i for transmitting axial illumination to the externalenvironment and an axial detector 342 d for detecting the axialreflectance from the external environment (i.e., external to theingestible device 300). The axial reflectance may result from differentilluminations, depending on the external environment.

Similarly, the radial sensor 332 includes a radial illuminator 332 i fortransmitting radial illumination to the external environment and aradial detector 332 d for detecting the radial reflectance from theexternal environment. Similar to the axial reflectance, the radialreflectance may result from different illuminations, depending on theexternal environment. For example, in some embodiments there may be aplurality of radial illuminations, and the radial reflectance detectedmay result from the plurality of radial illuminations reflecting fromthe external environment and scattering in multiple directions. As shownin FIGS. 7A to 7C, the position of the radial illuminator 332 i is suchthat the resulting radial illumination is in a different direction fromthe axial illumination generated by the axial illuminator 342 i. In someembodiments, the radial illumination is substantially perpendicular tothe axial illumination.

FIG. 7A illustrates a transit of the ingestible device 300 through anopaque liquid 410. The opaque liquid 410 is in contact with the radialwall 14 of the ingestible device 300, similar to the way opaque fluidwithin a large intestine (e.g., the large intestine 456 of FIG. 10C) maybe in contact with the ingestible device 300 as it transits through agastrointestinal tract under certain conditions. Therefore, the radialillumination transmitted by the radial illuminator 332 i is nearlyentirely internally reflected and detected by the radial detector 332 d,resulting in a relatively large reflectance being detected. In thisexample, the axial detector 342 d does not detect any reflectancebecause no substance or tissue is provided in front of the axialilluminator 342 i.

FIG. 7B illustrates a transit of the ingestible device 300 near a tissue412. The radial illumination transmitted by the radial illuminator 332 iis partially reflected (and partially absorbed by the tissue 412) anddetected by the radial detector 332 d, similar to the way a radialillumination may interact with the tissue of a small intestine (e.g.,the small intestine 454 of FIG. 10B) or other organs under conditions.Similar to FIG. 7A, the axial detector 342 d in this example also doesnot detect any reflectance because no substance or tissue is providedwithin a range of the axial detector 342 d. The amount of illuminationreflected and absorbed by the tissue 412 may depend on the wavelength ofthe illumination. For example, red tissue may reflect illumination witha wavelength in the red spectrum (i.e., 620 nm-750 nm) well, resultingin a relatively high reflectance being detected by the ingestible device300. In contrast, an illumination with a wavelength in the greenspectrum (495 nm-570 nm) or blue spectrum (450 nm-495 nm) may beabsorbed by the tissue, resulting in a relatively lower reflectancebeing detected by the ingestible device 300. In some embodiments, aplurality of radial or axial illuminations with different respectivewavelengths may be used to help identify the location of the ingestibledevice 300 within a gastrointestinal tract, given that that differentorgans and portions of the gastrointestinal tract have differentreflection properties.

FIG. 7C illustrates a transit of the ingestible device 300 through clearliquid with particulates 414. This type of environment may be similar tothe environment found in a stomach (e.g., the stomach 452 of FIG. 10A)under certain conditions. As shown, the axial illumination and theradial illumination are reflected by the particulates 414 a to 414 dwithin the range of the respective axial illuminator 342 i and radialilluminator 332 i. It is also possible for some of the illumination tobe reflected from one particulate to another, such as from particulate414 c to particulate 414 b. The reflectance detected by each of theaxial detector 342 d and the radial detector 332 d may not be limited toillumination generated by the respective axial illuminator 342 i andradial illuminator 332 i. It is possible for the axial detector 342 d todetect a reflectance resulting from a radial illumination. Similarly, itis possible for the radial detector 332 d to detect a reflectanceresulting from an axial illumination. In some embodiments, it ispossible to reduce this effect by having axial sensor 342 and radialsensor 332 use illumination with two different wavelengths. For example,if the radial sensor 332 has an illuminator 332 i and a detector 332 dthat transmit and detect wavelengths in the red spectrum, and the axialsensor 342 has an illuminator 342 i and a detector 342 d that transmitand detect wavelengths in the infrared spectrum, the effect of the axialilluminator 342 i on the radial detector 332 d is reduced.

Various embodiments of the sensors 32, 42 are described below withreference to FIGS. 4A to 8C.

Referring now to FIGS. 4A and 4B, shown therein are diagrams of anotherexample ingestible device 302. FIG. 4A is a cross-sectional view 302A ofthe ingestible device 302 and FIG. 4B is a three-dimensional side view302B of the ingestible device 302. The ingestible device 302 includes anaxial sensing sub-unit 42 having two axial sensors 342 and 344, and aradial sensing sub-unit 32 having two radial sensors 332 and 334.

As described with reference to FIGS. 3A and 3B, the axial sensor 342, orthe first axial sensor, is located proximally to the first end portion16 a. The axial sensor 344, or the second axial sensor, is locatedproximally to the second end portion 16 b. As shown in FIGS. 4A and 4B,the first axial sensor 342 and the second axial sensor 344 are locatedsubstantially opposite from each other with respect to the housing 12.The first axial illumination generated by the first axial sensor 342will therefore be in a substantially opposite axial direction from thesecond axial illumination generated by the second axial sensor 344.

The radial sensor 332 of the ingestible device 302, or the first radialsensor, is located proximally to a first wall portion of the radial wall14, while the radial sensor 334, or the second radial sensor, is locatedproximally to a second wall portion. As shown in FIGS. 4A and 4B, thefirst wall portion is spaced from the second wall portion byapproximately 180 degrees along the circumference of the radial wall 14.The first radial illumination and the second radial illuminationgenerated by the respective first radial sensor 332 and second radialsensor 334 are in different radial directions. As a result, the firstradial illumination and the second radial illumination are transmittedin substantially opposite directions.

Generally, in embodiments in which the radial sensing sub-unit 32 iscomposed of two or more radial sensors 332, 334, the radial sensors 332and 334 can be spaced along the circumference of the radial wall 14 byat least 60 degrees so that the resulting first radial illumination andthe second radial illumination are in generally different radialdirections from each other. Also, the separation between the radialsensor 332 and the radial sensor 334 can help to minimize internalreflections.

When more sensors are provided in the ingestible devices 10, 300, 302,more reflectance data will become available. As described with referenceto FIGS. 10A to 12C, the reflectance data can increase the accuracy withwhich the in vivo location of the ingestible devices 10, 300, 302 can beidentified.

Referring now to FIGS. 5A and 5B, shown therein are diagrams of anotherexample ingestible device 304. FIG. 5A is a cross-sectional view 304A ofthe ingestible device 304 and FIG. 5B is a three-dimensional side view304B of the ingestible device 304. Similar to the ingestible device 300,the ingestible device 304 includes an axial sensing sub-unit 42 havingone axial sensor 342. However, unlike the ingestible devices 300 and302, the radial sensing sub-unit 32 of the ingestible device 304includes four radial sensors 332, 334, 336 and 338.

As noted, the radial sensors 332, 334, 336 and 338 are generallyprovided so that they are spaced along the circumference of the radialwall 14 by at least 60 degrees. In the ingestible device 304, the radialsensors 332, 334, 336 and 338 may be positioned substantiallyequidistant from each other along the circumference of the radial wall14. It is noted, that similar to the ingestible device 300, but unlikethe ingestible device 302, the ingestible device 304 has a single axialsensor 342 near the first end portion 16 a. In some embodiments, aningestible device (e.g., the ingestible devices 300, 304) may have asampling chamber located proximal to the second end portion 16 b,substantially opposite from the location of the axial sensor 342. Thisembodiment is illustrated in FIGS. 14A, 14B, and 25. In someembodiments, an ingestible device (e.g., the ingestible devices 700,2500) may have a chamber for storing a substance that is delivered tothe gastrointestinal tract. These embodiments are illustrated in FIGS.14A-14B and FIG. 25.

Referring now to FIGS. 6A and 6B, shown therein are diagrams of anotherexample ingestible device 306. FIG. 6A is a cross-sectional view 306A ofthe ingestible device 306 and FIG. 6B is a three-dimensional side view306B of the ingestible device 306. The ingestible device 306 includes anaxial sensing sub-unit 42 having two axial sensors 342 and 344, similarto the ingestible device 302 of FIGS. 4A and 4B, and a radial sensingsub-unit 32 having four radial sensors 332, 334, 336 and 338, similar tothe ingestible device 304 of FIGS. 5A and 5B.

Referring now to FIG. 8A, shown therein is a cross-sectional view ofanother example embodiment of an ingestible device 308. For ease ofexposition, the axial sensing sub-unit 42 of the ingestible device 308is not shown in FIG. 8A. The radial sensing sub-unit 32 includes threeradial sensors 352, 354 and 356. In the ingestible device 308, theilluminator and detector of each of the respective radial sensors 352,354 and 356 are separated from each other by approximately 60 degrees.With this configuration, each of the radial illuminators 352 i, 354 iand 356 i has a respective illumination region 362 i, 364 i and 366 i ofapproximately 120 degrees with respect to the circumference of theradial wall 14. Similarly, each of the radial detectors 352 d, 354 d and356 d has a respective detection region 362 d, 364 d and 366 d ofapproximately 120 degrees with respect to the circumference of theradial wall 14.

The separation between the radial sensors 352, 354 and 356 can help tominimize internal reflections. For example, when the radial sensors 352,354 and 356 in the ingestible device 308 are separated from each otherby approximately 60 degrees, the radial sensors 352, 354 and 356 aregenerally equidistant from each other along the circumference of theingestible device 308 and are also separated from each other at amaximum distance. As a result, internal reflection at the interface ofthe housing 12 can be minimized.

FIGS. 8B and 8C illustrate example operations of the radial sensors 352,354 and 356 in different environments. FIG. 8B illustrates, at 402A, theingestible device 308 transiting through the small intestine 454. Due tothe tubular structure of the small intestine 454, the wall of the smallintestine 454 closely surrounds the ingestible device 308. FIG. 8Cillustrates, at 402B, the ingestible device 308 transiting through alarger space, such as the stomach 452. By physically separating theradial illuminators 352 i, 354 i and 356 i and the radial detectors 352d, 354 d and 356 d in the fashion shown in FIG. 8A, a more variablereflectance can be detected as shown in FIGS. 8B and 8C.

For the ingestible devices 10, 300, 302, 304, 306 and 308 describedherein, the axial sensing sub-unit 42 can include one or more axialsensors. At least one of the axial sensors may have an infraredLight-Emitting Diode (IR-LED) as an illuminator, and a detectorsensitive to illumination in the infrared spectrum. The radial sensingsub-unit 32 can also include one or more radial sensors. The radialsensors may, in some embodiments, include a yellow-green LED emittinglight having a wavelength of approximately 571 nm as an illuminator. Insome embodiments, the radial sensors may comprise a green LED emittinglight having a wavelength of approximately 517 nm and a red LED emittinglight having a wavelength of approximately 632 nm. In some embodiments,the radial sensors may include an RGB LED package capable of emittingillumination at a plurality of different wavelengths.

When the radial sensors include the RGB LED package, the ingestibledevice 10 can sequentially emit different wavelengths. Certain tissuesand fluids may have a different absorption rate for differentwavelengths of illumination. With the use of the RGB LED, a larger rangeof reflectance data can be collected and analyzed.

For example, the RGB LED package can transmit a red illumination with awavelength at approximately 632 nm and detect the reflectance resultingfrom the red illumination. The RGB LED package can then transmit a greenillumination with a wavelength at approximately 518 nm, and detect thereflectance resulting from the green illumination. The RGB LED packagecan then transmit a blue illumination with a wavelength at approximately465 nm and detect the reflectance resulting from the blue illumination.To determine the corresponding location of the ingestible device 10based on the reflectance data collected by the RGB LED package at thevarious frequencies, the microcontroller 110 and/or an externalprocessing module can compare each reflectance data series with eachother. It may be possible that certain one or more portions of areflectance data series at a particular wavelength may not beconsidered. Embodiments that determine the location of the device bycomparing reflectance data from different wavelengths are illustrated inFIGS. 19-24.

The detected reflectance from each of the different types ofillumination can be stored in the memory sub-unit 140 for laterprocessing by the microcontroller 110. Additionally, in some embodimentsthis processing may be done by an external processing module.

In some embodiments, the axial sensors and radial sensors may includecollimated light sources. The collimated light sources can orientreflective light in order to maximize reflectance from certain externalenvironments, such as anatomies that are circular in shape. For example,the illumination may be provided by collimated light sources, which maybe provided using LED binning or supplemental lenses, or by acombination of collimated and non-collimated light sources.

In some embodiments, after the sensing sub-unit 130 of the variousingestible devices 10, 300, 302, 304 and 306 described herein collectsthe reflectance data, the communication sub-unit 120 may transmit thedetected radial and axial reflectance data to an external processingmodule. In some embodiments a device processing module (not shown) isprovided in the ingestible devices 10, 300, 302, 304 and 306, and thereflectance data can be provided to the device processing module forprocessing. A processing module, regardless of whether it is, can thenidentify the location of the respective ingestible devices 10, 300, 302,304 and 306 according to the methods described herein. In someembodiments, the microcontroller 110 may function as the processingmodule.

The processing module, as noted, may be the microcontroller 110 providedon the PCB 30, or an external processing module. When the detected datais to be provided to the external processing module for analysis, thecommunication sub-unit 120 may store the detected data in the memorysub-unit 140 and provide the detected data to the external processingmodule later (e.g., after the ingestible device 10, 300, 302, 304 and306 exits from the body), or the communication sub-unit 120 may providethe detected data in real time using wireless communication components,such as a radio-frequency (RF) transmitter. However, it should be notedthat some or all of the processing used to determine the location of thedevice may be performed by the microcontroller 110 within the device.

As described, the reflectance data collected by the sensing sub-unit 130can be used to estimate an in vivo location of the ingestible device 10.As described with reference to FIGS. 9 to 12C, the axial reflectancedata and radial reflectance data may be used to identify the differentorgans and/or transit points. For example, the level of the axialreflectance and the radial reflectance can be indicative of the type ofthe external environment.

Also, different materials can have different refractive indexes and so,the resulting light absorption characteristics can vary. For example,fluids tend to have a relatively lower refractive index than tissues.Depending on the type of organ, different materials may be present. Inthe stomach, for instance, some liquid and food particles may bepresent. On the other hand, in the small intestine, there is limitedliquid but there may be air bubbles or gases. Based on the reflectancedata, the processing module can determine certain characteristics of theenvironment in which the reflectance data was detected.

Reference is now made to FIG. 9A, which is a flowchart of an examplemethod 500 of operation for the ingestible devices 10, 300, 302, 304,306 and 308 or another embodiment thereof described herein. Toillustrate the operation of the ingestible devices 10, 300, 302, 304,306 and 308, reference is also made to FIGS. 10A to 12C.

At step 510, any of the ingestible devices described herein, such as 10,300, 302, 304, 306 and 308, can be provided. As noted, the sensingsub-unit 130 can transmit illumination and collect reflectance dataresulting from interaction by the illumination with the externalenvironment.

The ingestible device 10, 300, 302, 304, 306 and 308 can be ingested byan individual and can then transit through the body of the individual.An example transit of each of the ingestible devices 300, 302, 304 and306 within a portion of the GI tract is shown in FIGS. 10A to 12C.

At step 520, the sensing sub-unit 130 is operated to collect areflectance data series as the ingestible device 10, 300, 302, 304, 306and 308 transits through the body.

The reflectance data series can include an axial reflectance data seriesand a radial reflectance data series. Each of the axial reflectance dataseries and the radial reflectance data series can include one or morereflectance values that indicate a respective axial reflectance andradial reflectance detected by the sensing sub-unit 130 during at leasta portion of the transit. The processing module may, in someembodiments, receive the reflectance data series in real time andoperate to identify the in vivo location in real time and so, theprocessing module will only have access to a portion of the reflectancedata series. In some embodiments, the processing module may receive thereflectance data after the ingestible device 10, 300, 302, 304, 306 and308 has exited the body and so, the complete reflectance data series isavailable to the processing module.

FIGS. 10A to 10C generally illustrate the transit of the ingestibledevice 300 through the stomach 452, the small intestine 454 and then,the large intestine 456.

The stomach 452, as shown at 450A, is a relatively large space. Theingestible device 300, therefore, can move along all axes. The motion ofthe ingestible device 300 can cause high deviations in the reflectancedata series. Also, the content of the stomach 452 may include relativelyclear liquid but also particulates if the individual has not fasted, ornot fasted sufficiently in advance of ingesting the ingestible device300. Therefore, certain reflectance data may be caused by the presenceof the particulates.

In the example of FIG. 10A, the ingestible device 300 is rotated severaltimes as it transits through the stomach 452. It will be understood thatthe path and orientation of the ingestible device 300 are merelyexamples and that other paths and orientations are possible. At position“I”, both the axial sensor 342 and the radial sensor 332 are facing awall of the stomach 452 but at different distances. The resultingreflectance detected by the axial sensor 342 and the radial sensor 332will likely vary due to the different absorption amounts caused by thedifferent distances. The axial reflectance and the radial reflectancewill result from interaction with, possibly, the wall of the stomach 452and particulates 414 within the stomach 452. The axial sensor 342 isalso likely to detect reflectance resulting from illumination generatedby the radial sensor 332, and vice versa. The axial and radialreflectance values can vary with the contents that may be present withinthe stomach 452. If the individual has fasted sufficiently, there may bea fewer amount of particulates 414 in the stomach 452 and so, theresulting reflectance values may be relatively low.

At position “II”, the axial sensor 342 faces a wall of the stomach 452in closer proximity than at position “I”. The axial sensor 342 willdetect a high reflectance value from the wall of the stomach 452 due tothe close proximity to the wall of the stomach. The radial sensor 332does not directly face a wall of the stomach 452. However, because theradial sensor 332 is exposed to the contents of the stomach 452, theradial sensor 332 will detect reflectance resulting from the presence ofany particulates 414 within the stomach 452.

The axial and radial reflectance detected by the axial sensor 342 andthe radial sensor 332 at position “III” is similar to the reflectancedetected at position “I”. The values may vary due to differentabsorption amounts due to the content of the stomach 452.

At position “IV”, however, the ingestible device 300 begins to transitthrough the pylorus, which is a much more narrow structure compared tothe stomach 452. As shown in FIG. 10A, the axial sensor 342 facestowards the small intestine 454 and therefore, will continue to detectreflectance resulting from contents that may be present in the smallintestine 454. The radial sensor 332, however, is in close contact withthe pylorus wall, and will detect a high reflectance value resultingfrom illumination of the pylorus wall. Due to the close contact betweenthe pylorus wall and the radial sensor 332, the axial sensor 342 willdetect very little, if any, reflectance resulting from illuminationtransmitted by the radial sensor 332.

FIG. 10B illustrates the transit of the ingestible device 300 throughthe small intestine 454. As noted, the small intestine 454 has a tubularstructure and therefore, the ingestible device 300 is restricted tolongitudinal and rotational motion along its longitudinal axis. Also,the small intestine 454 generally includes limited liquid but mayinclude a wet mucus layer and air bubbles or gas.

The axial reflectance and radial reflectance detected by the ingestibledevice 300 at positions “V” and “VI” are similar to the reflectancedetected at position “IV”. The axial sensor 342 faces one end of thesmall intestine 454 and will detect reflectance resulting fromparticulates 414, if present, or bends in the small intestine 454. Theradial sensor 332, however, is in close contact with the wall of thesmall intestine 454, and will detect a high reflectance value resultingfrom illumination of the wall of the small intestine 454. Due to theclose contact between the wall of the small intestine 454 and the radialsensor 332, the axial sensor 342 will detect very little, if any,reflectance resulting from illumination transmitted by the radial sensor332.

After the ingestible device 300 transits through the small intestine454, the ingestible device 300 enters the large intestine 456.Generally, the large intestine 456 is characterized by opaque browncontents due to the presence of fecal matter. The opaque contents mayinclude liquids and/or solids. Depending on the type of illuminationbeing generated, the reflectance detected at positions “VII”, “VIII” and“IX” will vary. For example, it is possible that the reflectancedetected at positions “VII”, “VIII” and “IX” may be mostly internalreflectance when the illumination is within the visible spectrum (asshown in FIG. 7A in respect of the radial sensor 332). When theillumination is an IR illumination or a green illumination, thereflectance detected at positions “VII”, “VIII” and “IX” may beassociated with fairly high values due to the brown color of thecontent.

The transit of the ingestible device 302 through the stomach 452, thesmall intestine 454 and then, the large intestine 456 is described withreference to FIGS. 11A to 11C. As illustrated in FIGS. 4A and 4B, theingestible device 302 includes two radial sensors 332 and 334 and twoaxial sensors 342 and 344. Additional reflectance values can bedetected, accordingly.

Referring first to FIG. 11A, the reflectance values detected by thesensors 332, 334, 342 and 344 in the ingestible device 302 at position“I” is similar to the reflectance values detected by the sensors 332 and342 in the ingestible device 300. The axial sensors 342, 344 and theradial sensors 332, 334 are generally exposed to the contents, if any,within the stomach 452.

At position “II”, the first axial sensor 342 detects a different firstaxial reflectance than the second axial reflectance detected by thesecond axial sensor 344. The first axial sensor 342 is in closeproximity with the wall of the stomach 452 whereas the second axialsensor 344 is farther away from a wall of the stomach 452. The firstaxial sensor 342 will therefore detect a high reflectance value due tothe proximity to the wall of the stomach but the second axial sensor 344will detect a reflectance value only depending on the type of contentspresent in the stomach 452. Based on a comparison of the largely varyingfirst axial reflectance and second axial reflectance, the processingmodule can determine that the ingestible device 302 has not arrived atthe small intestine 454.

At position “III”, the second radial sensor 334 will detect a highreflectance value due to its proximity to the wall of the stomach 452.However, the first radial sensor 332, as described with reference toFIG. 10A, detects a reflectance value that varies with the amount ofparticulates 414. Again, the processing module can determine that theingestible device 304 has not arrived at the small intestine 454.

As the ingestible device 302 moves into the pylorus, the first andsecond radial sensors 332 and 334 begin to detect a high reflectancevalue due to the close contact with the pylorus wall. The processingmodule can determine from the radial reflectance values that atransition may be occurring. The reflectance values detected by thefirst axial sensor 342 and the second axial sensor 344 will continue todepend on the contents of the small intestine 454 and the stomach 452,respectively, due to their orientation.

FIG. 11B illustrates the transit of the ingestible device 302 throughthe small intestine 454. The radial reflectance values detected by theingestible device 302 will generally be similar to the radialreflectance values detected by the ingestible device 300 in FIG. 10Bsince the radial sensors 332 and 334 are in close proximity to the wallof the small intestine 454. The axial reflectance values detected by theaxial sensors 342 and 344 will again vary depending on the contents thatmay be present in the small intestine 454.

As noted, the large intestine 456 is characterized by opaque browncontents. Therefore, the reflectance detected at positions “VII”, “VIII”and “IX” as the ingestible device 302 travels through the largeintestine 456, an example of which is shown in FIG. 11C, may be mostlyinternal reflectance when the illumination is within the visiblespectrum, and may include high reflectance values when the illuminationis an IR illumination or a green illumination due to the brown color.

Another example transit through the GI tract is now described for theingestible device 304 with reference to FIGS. 12A to 12C. The ingestibledevice 304 includes four radial sensors 332, 334, 336 and 338 (as shownin FIGS. 5A and 5B) and an axial sensor 342.

The axial reflectance values detected in the example shown in FIGS. 12Ato 12C are generally similar to the axial reflectance values detected inthe example shown in FIGS. 10A to 10C. Accordingly, the axialreflectance values will not be described again with reference to FIGS.12A to 12C. It is possible, in certain locations within the GI tract,that the axial sensor 342 may detect a greater amount of reflectanceresulting from illumination generated from one of the radial sensors332, 334, 336 and 338.

In FIG. 12A, the radial reflectance values detected by the radialsensors 332, 334, 336 and 338 at positions “I” and “II” will generallybe similar to the radial reflectance values detected by the ingestibledevices 300 and 302 in FIGS. 10A and 11A, respectively. The radialreflectance values detected by radial sensors 336 and 338 will varydepending on the width of the stomach 452. At position “III”, the radialreflectance value detected by the radial sensors 336 and 338 will besimilar to the radial reflectance detected by the radial sensor 332.From the radial reflectance values collected at positions “I”, “II” and“III”, the processing module can therefore determine that the ingestibledevice 304 has not entered the small intestine 454 since the radialreflectance data from the various radial sensors 332, 334, 336 and 338are likely inconsistent values due to their dependence on the contentsof the stomach 452 and their changing orientations.

Like the transit of the ingestible devices 300 and 302 shown in FIGS.10A and 11A, the radial reflectance values collected at position “IV”will also indicate a pyloric transit is occurring. In the example shownin FIG. 12, since four different radial sensors 332, 334, 336 and 338are in the ingestible device 304, a greater amount of reflectance valuesis provided and so, the processing module can more easily determine thattransit to the small intestine 454 is occurring. Similarly, the transitof the ingestible device 304 through the small intestine 454 in FIG. 12Bgenerates similar radial reflectance values as the configurations of thesensing sub-unit 130 of FIGS. 10B and 11B. However, as noted, theingestible device 304 provides a greater amount of reflectance valuesand therefore, more reliable location detection.

Finally, as noted, the transit of the ingestible device 304 through thelarge intestine 456 may result in mostly internal reflectance due to thepresence of mostly opaque contents in the large intestine 456 when theillumination is within the visible spectrum, and may result in highreflectance values when the illumination is an IR illumination or agreen illumination due to the brown color.

In some embodiments, the sensing sub-unit 130 can include a temperaturesensor. The temperature sensor can operate to collect a temperature dataseries as the ingestible device 10 transits through the body. Thetemperature sensor may operate while the sensors 32, 42 are inoperation, or may operate in response to a trigger provided by themicrocontroller 110 or by an external device (e.g., the base station)via the communication sub-unit 120. In some embodiments, the temperaturemay be used to determine when an ingestible device has entered or exitedthe gastrointestinal tract. For example, upon entering the stomach froman environment external to the body, the temperature measured by theingestible device 10 may reflect a value close to body temperature.Similarly, upon naturally exiting the body, the temperature measured byingestible device 10 may change to ambient room temperature.

Temperature values may be used, in some embodiments, in determining anin vivo location of the ingestible device 10. Temperature values in thestomach 452 can vary due to liquids and/or foods that may have beeningested. For example, a large drop in temperature values can generallyindicate that the ingestible device 10 is still inside the stomach 452.

Referring again to FIG. 9A, at step 530, a processing module candetermine a quality of the environment external to the ingestible device10 using the reflectance data series collected by the sensing sub-unit130. The reflectance data series will include an axial reflectance dataseries including axial reflectance values and a radial reflectance dataseries including radial reflectance values. Example reflectance dataseries are described with reference to FIGS. 13A to 13C.

The different segments of the GI tract are generally associated withdifferent characteristics. The quality of the environment within thestomach 452 is generally inconsistent since the environment varies withparticulates 414 that may or may not be present. The large space in thestomach 452 also allows for constant motion by the particulates 414 andthe ingestible device 10, which further increases the variability of theenvironment of the stomach 452. The small intestine 454, on the otherhand, is a more narrow space and typically includes consistent contenttypes. Therefore, the small intestine 454 can be associated with arelatively homogenous quality. The large intestine 456, similar to thestomach 452, is a larger space than the small intestine 454 andtherefore, allows for more variable motion by its contents and theingestible device 10.

FIG. 13A is a plot 600A illustrating a reflectance data series collectedby the ingestible device 300 of FIG. 3A during a transit through a GItract of a subject. The y-axis of the plot 600A is provided as raw ADCvalues that represent the reflectance values and the x-axis of the plot600A is provided in terms of time (hours). The plot 600A shows a radialreflectance data series 602A collected by the radial sensor 332 and anaxial reflectance data series 604A collected by the axial sensor 342.

Between 0 to 3 hours, or during a transit period 610A, the radialreflectance data series 602A is particularly radical. As described withreference to FIG. 10A, the ingestible device 300 is likely transitingthrough the stomach 452 during the transit period 610A since the stomach452 provides a large space for the ingestible device 300 to move andtherefore, the resulting reflectance data series is likely to be largelyvaried.

At approximately 3 hours, or at transit point 620A, the reflectance dataseries decreases in value. Between 3 hours to approximately 7 hours, orduring transit period 612A, the reflectance data series appears to berelatively stable. The decrease in the reflectance values at the transitpoint 620A and relatively consistent reflectance values thereafter untiltransit point 622A which generally indicates transit within the smallintestine 454.

A transit time through the small intestine 454 of a healthy adult isapproximately four hours in length. Also, as described with reference toFIG. 10B, the reflectance data series collected by the ingestible device300 as it transits through the pylorus to the small intestine 454increases in stability. In particular, the radial reflectance dataseries 602A is likely to include consistently high reflectance values asthe ingestible device 300 transits through the small intestine 454 dueto the close proximity to the wall of the small intestine 454.

The transit point 622A is at approximately 7 hours after the ingestibledevice 300 entered the GI tract. As shown in the plot 600A, asubstantial spike occurs at the transit point 622A and the reflectancedata series continues at approximately the increased value thereafterduring a transit period 614A. During the transit of the ingestibledevice 300 through the large intestine 456, as described with referenceto FIG. 10C, the axial sensor 342 and radial sensor 332 may detectmostly internal reflectance due to the content of the large intestine456 being mostly opaque brown contents when the illumination is withinthe visible range. Accordingly, the transit point 622A likely indicatesa transit into the large intestine 456.

FIG. 13B is another plot 600B illustrating a reflectance data seriescollected by the ingestible device 300 of FIG. 3A during another transitthrough the GI tract of a subject. The plot 600B shows a radialreflectance data series 602B collected by the radial sensor 332 and anaxial reflectance data series 604B collected by the axial sensor 342.

Similar to the reflectance data series shown in plot 600A, the plot 600Billustrates a transit point 620B between the stomach 452 and the smallintestine 454, and a transit point 622B between the small intestine 454and the large intestine 456. The transit period 612B through the smallintestine 454 is approximately four hours, which is typical for ahealthy adult. However, the transit period 610B through the stomach 452is substantially longer than the transit period 610A. The variationbetween the transit periods 610A and 610B can be a result of variousfactors, such as, but not limited to, whether the individual fastedsufficiently before ingesting the device 300 and other possible events.

FIG. 13C shows another plot 600C illustrating a reflectance data seriescollected by the ingestible device 300 of FIG. 3A during another transitthrough the GI tract of a subject. The plot 600C shows a radialreflectance data series 602C collected by the radial sensor 332 and anaxial reflectance data series 604C collected by the axial sensor 342.Unlike the plots 600A and 600B, the plot 600C also includes atemperature data series 606.

As shown approximately at 2.5 hours (at transit point 620C), thetemperature in the temperature data series 606 increases slightly and ismaintained at the increased temperature for most of the transit periods612C and 614C. The increase in temperature at the transit point 620C canindicate a transit from the stomach 452 to the small intestine 454.

The reflectance data series shown in the example plots 600A to 600C areprovided as raw ADC values. As illustrated in FIGS. 6A to 6C, it ispossible for the processing module to generally identify the transitpoints 620, 622 within the GI tract based on the raw ADC values. Theprocessing module may, in some embodiments, analyze the raw ADC valueswhen determining the quality of the external environment of theingestible device 10 in order to estimate the in vivo location of theingestible device 10. An example method 550 of determining the qualityof the environment external to the ingestible device 10 is describedwith reference to FIG. 9B.

It will be understood that the steps and descriptions of the flowchartsof this disclosure, including FIG. 9B, are merely illustrative. Any ofthe steps and descriptions of the flowcharts, including FIG. 9B, may bemodified, omitted, rearranged, performed in alternate orders or inparallel, two or more of the steps may be combined, or any additionalsteps may be added, without departing from the scope of the presentdisclosure. For example, in some embodiments the ingestible device maysimultaneously calculate standard deviation and mean values to speed upthe overall computation time. Furthermore, it should be noted that thesteps and descriptions of FIG. 9B may be combined with any other system,device, or method described in this applications, and any of theingestible devices or systems discussed in this application could beused to perform one or more of the steps in FIG. 9B.

To estimate the in vivo location of the ingestible device 10, theprocessing module can determine standard deviations for each of theaxial reflectance data series 604 and the radial reflectance data series602, at step 560.

Typically, due to the varying environment of the stomach 452, the axialand radial standard deviation values are relatively high. The axial andradial standard deviation values decrease as the ingestible device 10transits through the pylorus into the small intestine 454 as a result ofthe more homogenous environment of the small intestine 454. To identifythe transit point 620 between the stomach 452 and the small intestine454, the processing module can determine whether each of the axialstandard deviation value and the radial standard deviation valuesatisfies a deviation threshold. Each of the axial and radial standarddeviation values may satisfy the deviation threshold when each of theaxial and radial standard deviation values is equal to or less than thedeviation threshold.

The deviation threshold can include different values for the axialreflectance data series and the radial reflectance data series, or thesame value for the axial and radial reflectance data series. Thedeviation threshold is a value that may be used to indicate that thestandard deviation of the respective portions of the data series hasreached a level that is representative of the environment of the smallintestine 454. The deviation threshold may be varied depending onvarious factors, such as for addressing certain characteristics orrequirements of an individual, when the ingestible device 10 is firstinitiated. The deviation threshold may be predefined, and/or may bevaried during use based on the reflectance data collected by the sensingsub-unit 130 over predefined time periods.

In some embodiments, the deviation threshold may be adjusted during usebased on some of the reflectance data. For example, an average can bedetermined for the reflectance data collected during a predefined periodof time. When the determined average indicates that the reflectance datavalues are generally lower than expected, the processing module maydecrease the deviation threshold accordingly to accommodate the lowerreflectance data values. Similarly, when the determined averageindicates that the reflectance data values are generally higher thanexpected, the processing module may increase the deviation thresholdaccordingly to accommodate the higher reflectance data values.

When the processing module determines that both the axial standarddeviation value and the radial standard deviation value satisfies thedeviation threshold, at step 562, the processing module may indicatethat the quality of the external environment of the ingestible device 10is homogenous (at step 582) and thus, the ingestible device 10 haslikely arrived in the small intestine 454. Otherwise, the processingmodule may indicate the ingestible device 10 is unlikely in a homogenousenvironment (at 580). In some embodiments, the processing module may, atstep 564, further verify the determination at step 562 and generate, atstep 566, average values for a portion of the reflectance data seriesprior to determining the quality of the external environment to furtherverify the determination at step 562.

In some embodiments, a comparison between the axial standard deviationvalues and the radial standard deviation values may be conducted. Tofacilitate the comparison, the processing module may adjust the axialstandard deviation values and the radial standard deviation values usingan average of the corresponding reflectance data values.

Although determining the axial and radial standard deviation valuessatisfy the deviation threshold likely indicates a transition into thesmall intestine 454 (at step 582), there may be applications in whichthe accuracy of the location of the ingestible device 10 can besignificant. For example, when the ingestible device 10 operates tocollect samples specifically from the small intestine 454, theingestible device 10 should be within the small intestine 454 prior toany sample collection—particularly because there is limited space in theingestible device 10 for receiving samples.

To verify the in vivo location, the processing module can compare aportion of the axial reflectance data series with a portion of theradial reflectance data series. For example, at step 566, an averagevalue can be generated for the portion of the axial reflectance dataseries to obtain an axial average and another average value can begenerated for the radial reflectance data series to obtain a radialaverage. As described with reference to at least FIGS. 10B and 13A, incomparison with the axial reflectance values, the radial reflectancevalues generally decrease significantly as the ingestible devicetransits through the small intestine 454 due to the greater lightabsorption. Therefore, the radial average should be less than the axialaverage when the ingestible device 10 is within the small intestine 454.In some embodiments, the processing module may indicate the quality ofthe external environment is homogenous (at step 582) when the radialaverage is determined, at step 568, to be less than the axial average bya minimum difference value. Otherwise, the processing module mayindicate the ingestible device 10 is unlikely in a homogenousenvironment (at 580).

Similar to the deviation threshold, the minimum difference value may bevaried for various factors, such as for addressing certaincharacteristics or requirements of an individual, when the ingestibledevice 10 is first initiated. The minimum difference value may bepredefined and/or may be varied during use based on data collectedduring the transit.

In some embodiments, the processing module may vary the minimumdifference value based on a sum of the collected reflectance data and/oran absolute value of a sum of the axial reflectance data series and/orthe radial reflectance data series.

The portion of the reflectance values that are selected for comparisoncan also vary. In some embodiments, after the initial detection of thetransit point 620 based on the standard deviation values, the processingmodule may select a number of reflectance values following the transitpoint 620. The number of reflectance values may, in some embodiments, beadjusted during use based on the data collected during transit.

In some embodiments, the number of reflectance values may be adjustedbased on a total axial standard deviation (which is a sum of the axialstandard deviation values) and a total radial standard deviation (whichis a sum of the radial standard deviation values). For example, when thetotal axial standard deviation and the radial standard deviation areboth less than a detectable deviation threshold, the number ofreflectance values can be reduced since the total axial standarddeviation and the radial standard deviation can be considered negligiblewhen lower than the detectable deviation threshold. The detectabledeviation threshold generally indicates a minimum level of deviation inthe reflectance values that, for the ingestible device 10, can vary thedetermination of the in vivo location.

As described with reference to FIG. 13C, the sensing sub-unit 130 mayfurther include a temperature sensor for collecting temperature values.In some embodiments, the temperature sensor may be provided at themicrocontroller 110 of the ingestible device 10.

The collected temperature values may be used by the processing module tofurther verify, at step 570 and step 572, the in vivo location. Sincethe temperature inside the stomach 452 is more variable than thetemperature inside the small intestine 454, any significant changes intemperature can indicate that the ingestible device 10 has not enteredthe small intestine 454. For example, the processing module can indicatethat a temperature change exceeding a temperature threshold, asdetermined at step 572, which can be a maximum allowable change invalue, indicates that the environment is not homogenous (at step 580)and the ingestible device 10 is not in the small intestine 454. Thetemperature values can also indicate entry into the body (e.g., thetemperature is likely to increase upon entry into the body) and/or exitfrom the body (e.g., the temperature is likely to decrease upon exitfrom the body).

In some embodiments, the temperature values can be used in temperaturecorrection for an internal clock to improve time accuracy. Thetemperature values can be determined, using a lookup table or a formula,whether the time recorded at each waking cycle of the microcontroller110 should be corrected due to the varying temperature during use of theingestible device 10.

In some embodiments, when not being used (e.g., outside the body), thetemperature sensor can detect temperature values from the surroundingenvironment to indicate the storage conditions of the ingestible device10.

Referring again to FIG. 9A, at step 540, the processing module canidentify the location of the ingestible device 10 based on the qualityof the external environment determined at step 530.

The different segments of the GI tract are associated with differentcharacteristics. The processing module can, therefore, identify the invivo location using data collected from the external environment of theingestible device 10 described herein. For example, the small intestine454 is typically associated with a more homogenous environment due tothe restricted structure and consistent content. Therefore, theprocessing module can indicate that the in vivo location of theingestible device 10 is likely the small intestine 454 when the qualityof the external environment is determined to be homogenous.

With the location detection methods described herein, such as method 500for example, an in vivo location of the ingestible device 10 can beidentified with a relatively high accuracy. The ingestible device 10, asa result, can have greater control on when certain tasks are conducted.

It will be understood that the steps and descriptions of the flowchartsof this disclosure, including FIG. 9A, are merely illustrative. Any ofthe steps and descriptions of the flowcharts, including FIG. 9A, may bemodified, omitted, rearranged, performed in alternate orders or inparallel, two or more of the steps may be combined, or any additionalsteps may be added, without departing from the scope of the presentdisclosure. For example, in some embodiments the ingestible device maybegin to determine a quality of the environment using existing data,while simultaneously operate axial and radial sensing sub-units togather new data. Furthermore, it should be noted that the steps anddescriptions of FIG. 9A may be combined with any other system, device,or method described in this applications, and any of the ingestibledevices or systems discussed in this application could be used toperform one or more of the steps in FIG. 9A.

As noted, any of the ingestible devices described herein, such as theingestible devices 10, 300, 302, 304, 306 and 308, can be used fordifferent tasks. In some cases, the ingestible device 10 may be used forcollecting usable samples from the contents of the GI tract (e.g., 100μL sized samples) and maintaining each sample in isolation from oneanother until the samples are extracted. In some embodiments, theingestible device 10 may be used for releasing substances into the bodyin a controlled manner. In this case, prior to introducing theingestible device 10 into the body, at least one of the chambers in theingestible device 10 may be loaded with a substance, either in a liquidor dry-powder format.

In some embodiments, an ingestible device for identifying a locationwithin the GI tract of a body (e.g., the ingestible device 700) containsa medicament, including therapeutics, and a means for controlledadministration of the medicament for treatment of a disease. In someaspects, the means for controlled administration may include controlmeans for dispensing the medicament to specific areas of the GI tract,according to the device's location in the gastrointestinal tract asdetermined by the methods provided herein. For example, in the case ofileocolitis, the most common type of Crohn's disease, dispensing of amedicament at the site of inflammation, e.g., the ileum, would make itreadily available to the inflamed, diseased tissue, while at the sametime minimizing the concentration in systematic circulation. As aresult, the use of an ingestible device to deliver a medicament couldreduce potential side effects. Similar methods may be used to treatother GI diseases where local delivery provides benefits. For example,treatment of GI tumors or treatment of celiac disease may be effectivelytargeted.

In some embodiments, the ingestible device for identifying a locationwithin the GI tract of a body (e.g., the ingestible devices 10, 300,302, 304, 306, and 700) collects data on transit from one location inthe GI tract to another (e.g., transit time). For example, the devicemay measure transit times through different regions of the GI tract suchas the stomach, small and large intestines. Such transit times may beuseful for detecting pathological conditions of motility such asgastroparesis and slow transit constipation. By recognizing specificanatomical locations and determining transit time as described herein,the device provides an accurate method of measuring whole gut transittime (WGTT), gastric emptying time (GET), small bowel transit time(SBTT) and colonic transit time (CTT). In some embodiments, this mayresult in a wealth of additional knowledge as compared to ingestibledevices that rely on pH or imaging data to determine location.

In some embodiments, the ingestible device 10 may be configured tocollect samples after releasing one or more substances into the body (ina predefined sequence in the case of multiple reagents) and theingestible device 10 may then collect a resulting physical sample fromthe body. For example, substances that may inhibit enzymatic andchemical processes may be released into the body before a sample iscollected (e.g., for preventing potential degradation of the collectedsamples in order to obtain a “snap-shot” of the environment from whichthe sample was collected).

An example ingestible device 700 configured to autonomously conduct thelocation detection methods described herein and to carry substances isdescribed with reference to FIGS. 14A, 14B and 15. As can be seen fromFIGS. 14A, 14B and 15, certain components of the ingestible device 700correspond to components of the ingestible device 10 (see for exampleFIGS. 1A, 1B and 2A). Therefore, the components that are similar iningestible devices 10 and 700 will not be described again.

FIGS. 14A and 14B illustrate an exploded view 700A and a cross sectionalview 700B, respectively, of the ingestible device 700. The ingestibledevice 700 is configured in a similar manner as the ingestible device 10but the ingestible device 700 is configured to store substances (e.g.,samples, reagents, medicaments or therapeutics). Similar to theingestible device 10, the ingestible device 700 includes a battery 18and a PCB 30. The PCB 30 has, at least, the axial sensing sub-unit 42and the radial sensing sub-unit 32 embedded thereon. The battery 18 andPCB 30 are enclosed by the first wall portion 14 a and the first endportion 16 a. However, unlike the ingestible device 10, the ingestibledevice 700 includes a motor 704 and a storage sub-unit 702 that areenclosed by a second wall portion 714 b and a second end portion 716 bconfigured to receive an end of the motor 704. The second wall portion714 b may also act as a chamber enclosure.

The storage sub-unit 702 includes chambers, such as 706, for storingsubstances. The substances may be collected from the body during transitas samples and/or released to the body during transit. In some cases,the substances may be loaded into the ingestible medical device 700before use so that the substances can be released in the body duringtransit. An access port 718 is provided on the second wall portion 714 bto accommodate entry or exit of the substances into or from the chambers706. The second wall portion 714 b may be referred to as a chamberenclosure.

The chambers 706 are generally long rectangular grooves along a lengthof the cylindrical-shaped storage sub-unit 702. However, it will beunderstood that the chambers 706 can take any shape and the shape mayvary depending on the intended application of the ingestible device 700.Each of the chambers 706 can be isolated from one another so that one ormore discrete substances may be stored either from sampling duringoperation or to be stored prior to usage for release during operation.Generally, each of the chambers 706 has dimensions to store a usablesample size, such as a volume of about 100 μL, for example.

Each chamber 706 has a corresponding chamber opening 708. The chamberopenings 708 may span an arc of approximately 60°. Therefore, areas thatare not recessed (e.g., each with a span of approximately) 60° may beprovided between each of the chamber openings 708 on the storagesub-unit 702. In some embodiments, the chamber openings 708 and thecorresponding chambers 706 are unevenly distributed around thecircumference of the storage sub-unit 702. For example, the chamberopenings 708 and the corresponding chambers 706 may be located closertogether when it is undesirable for the ingestible device 700 to pausebetween each collection or release of a substance. In some embodiments,the chamber opening 708 can span an arc having a differentcircumferential extent.

As described above, the chambers 706 in the storage sub-unit 702 may beused for storing samples that are collected from the GI tract and/orstoring substances for release into the GI tract. Therefore, both thechamber openings 708 and the access port 718 are sufficiently large toaccommodate movement of substances into or out of the chambers 706through peristaltic motion.

The operation of the storage sub-unit 702 is further described withreference to FIG. 15.

Similar to the ingestible device 10, a connecting wall portion 14 c canconnect the first wall portion 14 a with the second wall portion 714 b.A housing 712 is formed from the first end portion 16 a, the second endportion 716 b, and the radial wall 14 formed by the first wall portion14 a, the connecting wall portion 14 c, and the second wall portion 714b. As shown in FIG. 14B, the radial wall 714 extends from the first endportion 16 a to the second end portion 716 b.

Due to the storage sub-unit 702 and the motor 704, the axial sensingsub-unit 42 is limited to axial sensors located proximal to the firstend portion 16 a. However, the radial sensing sub-unit 32 may includeany number of radial sensors as described herein. For example, theingestible device 700 can include a radial sensing sub-unit 32 that isconfigured in a similar way as shown in FIGS. 5A, 4A and 8A.

Also, the storage sub-unit 702 and the chamber enclosure 714 b can beconfigured differently. For example, the storage sub-unit 702 mayinstead rotate and the chamber enclosure 714 b may be stationary. Otherembodiments of the storage sub-unit 702 and the chamber enclosure 714 bmay be used.

FIG. 15 is a block diagram 750 of an example embodiment of electricalcomponents that may be used for the ingestible device 700 of FIG. 14A.

The memory sub-unit 140, the power supply 160 and the sensing sub-unit130 can operate in a similar manner for both the ingestible devices 10and 700.

The communication sub-unit 720 in the ingestible device 700 includes theoptical encoder 20, like the ingestible device 10, and also a RFtransceiver 722. It is possible for the ingestible device 10 to alsoinclude the RF transceiver 722 for conducting wireless communicationwith an external processing module.

The RF transceiver 722 may be considered a peripheral device to themicrocontroller 710. Therefore, the microcontroller 710 may initiate RFcommunications by sending the RF transceiver 722 data specifying thechannel on which the RF transceiver 722 is to transmit as well as power,frequency, and other parameters that are used for RF communication aswell as data that is specific to the operation of the ingestible device700.

In some embodiments, the RF transceiver 722 in the ingestible device 700may facilitate real-time telemetry during collection and/or release of asubstance. For example, the RF transceiver 722 may transmit dataassociated with the operation of the ingestible device 700 and/orsamples collected to the base station in real-time.

The microcontroller 710 may be provided using a similar processor as themicrocontroller 110. However, the microcontroller 710 in the ingestibledevice 700 will be configured to handle additional functionalities, suchas those provided by a motor control sub-unit 740 and a positioningsub-unit 730.

For a majority of the time that the ingestible device 700 is inoperation, the microcontroller 710 is likely the only component thatdraws power from the power supply 160. When the microcontroller 710 isnot in use, most of the other components can be powered down.

The positioning sub-unit 730 and the microcontroller 710 can operatetogether to determine a location of the access port 718 relative to eachof the chamber openings 708. The positioning sub-unit 730 may include amagnetic sensor or a sensor.

When the magnetic sensor is used for determining a location of theaccess port 718, an encoding magnet arrangement 734 is also included inthe ingestible device 700. As a magnet in the encoding magnetarrangement 734 rotates over the magnetic sensor, the magnetic sensorsenses the magnet and generates a corresponding positioning signal,which can be a quasi-sinusoidal or square wave depending on theparticular implementation.

The motor control sub-unit 740 includes a motor driver 742 and the motor704. The motor driver 742 may be a Dual Full Bridge Driver thatcomprises a DPDT switch and protective circuitry including aresistor-diode combination in a single package.

When the motor 704 receives power, it will rotate the chamber enclosure714 b by a distance corresponding to the received power. Since theencoding magnet arrangement 734 is embedded in the chamber enclosure 714b, the encoding magnet arrangement 734 rotates with the chamberenclosure 714 b. When the magnets rotate over the magnetic sensor, themagnetic sensor senses a varying magnetic strength from the magnets andencodes this information in a positioning signal which is then sent tothe microcontroller 710 through the A/D Converter 116.

Unlike the microcontroller 710, in some aspects the motor 704 may have ahigh discharge capacity. For example, at 3 V operating voltage, a 6 mmpager gear-motor may draw a current of 120 mA when unloaded and acurrent of 230 mA when stalled. It will be understood that the 6 mmmotor is merely an example of a motor that can be used in the ingestibledevice 700 and that other types of motor with similar operatingcharacteristics and varying dimensions may be used.

The power supply 160 may need to supply a high energy density and todischarge a high current on demand (e.g., to discharge a high level ofcurrent for momentary periods of time). An example of such a powersupply may be multiple silver oxide batteries (e.g., two 30 mAhbatteries that operate at 1.55V each, amounting to a combined 3.1V).Silver oxide chemistry provides relatively high energy density and candischarge sufficient current on demand (e.g., 150 millicoulombs/secondwith a maximum of 250 millicoulombs/second). The high energy density ofthe silver oxide chemistry also indicates that the silver oxide batteryhas a long battery life, with a low self-discharge rate of approximately5%/yr. Batteries formed using silver oxide chemistry may also have acompact form and such forms exist as standard coin cell form factors.Another example battery chemistry which possesses high energy density,long life, and high on-demand discharge rates can include lithiumpolymer.

The motor 704 is coupled to the microcontroller 710 for receiving powerfrom the power supply 160. The motor 704 can be coupled to themicrocontroller 710 via control circuitry. The motor 704 may then rotatethe chamber enclosure 714 b around the storage sub-unit 702. Generally,the motor 704 is implemented such that it provides a high torque withoutexternal gearing. In some embodiments, the motor 704 may be a miniatureDC motor. In some embodiments, the DC motor may be brushless. Forexample, a miniature DC motor with a 700:1 reduction planetary gearing(e.g., as manufactured by Precision Microdrive) may be used. The 700:1reduction planetary gearing generally provides a proportional increasein torque and decrease in revolutions per minute (RPM).

As illustrated in FIG. 14B, two concentric layers form around the motor704. In order to maximize space inside the ingestible device 700, thestorage sub-unit 702 and the chamber enclosure 714 b are built to fitconcentrically around the motor 704. A first layer around the motor 704is the storage sub-unit 702 and a second layer around the motor 704 isthe chamber enclosure 714 b.

Referring now to FIG. 16, shown therein is a flowchart of an examplemethod 800 of operating the ingestible device 700.

At step 810, the ingestible device 700 is activated. The ingestibledevice 700 may be activated by activating the magnetic switch 162. Forexample, the ingestible device 700 can be removed from the magneticfield to switch the magnetic switch 162 to an ‘ON’ position. Current maythen flow through the electrical pathways in the ingestible device 700(e.g., pathways on the PCB 30).

In response to the ingestible device 700 being activated, themicrocontroller 710 can begin to detect and initialize peripheralcomponents and/or devices. The microcontroller 710 can detect, throughthe general I/O 112, for example, whether one or more peripheral devicesare present on a bus by sending out a series of requests to specificaddresses associated with the general I/O 112. In response, anyperipheral device that is present then sends an acknowledging signal tothe microcontroller 710. If the microcontroller 710 does not receive aresponse within the designated time frame, the microcontroller 710operates as if no peripheral device is present. The designated timeframes can vary. An example time frame can be 20 seconds. Themicrocontroller 710 then initializes the peripheral devices that arepresent. The initialization process may vary with different peripheraldevices.

After the microcontroller 710 initializes the peripheral devices, themicrocontroller 710 generally places the peripheral devices in alow-energy state, or may even completely power down the peripheraldevices with non-volatile memory, in order to avoid unnecessaryconsumption of power.

At step 820, the microcontroller 710 receives operational instructionsfor the ingestible device 700.

After initializing the peripheral devices, the microcontroller 710 maypoll the communication sub-unit 720, such as the RF transceiver 722, fora start signal from a base station. This start signal may generally befollowed by operational instructions from the base station. The startsignal and the operational instructions may be provided wirelesslythrough IR or RF transmission depending on the particular implementationof the ingestible device 700.

The base station can include a dock that acts as a peripheral device toan external computer and may communicate with the external computerthrough a COM Port of the external computer using the SPI protocol. Insome embodiments, the base station includes a microcontroller, such asthe processing module for identifying the in vivo location of theingestible devices described herein, and a transceiver. The transceiveris selected to facilitate communication between the ingestible device700 and the base station.

Referring now to FIGS. 17A to 17C, shown therein are different views ofan example embodiment of a base station 950.

The base station 950 includes a programming and charging dock 952, amagnetizing region 960 at a top surface 950 t, and a Universal SerialBus (USB) connection port 962 at a front surface 950 f. The magnetizingregion 960 can be used to trigger the magnetic switch 162. When themagnetic switch 162 is activated, the magnetic switch 162 can reset themicrocontroller 110 so that the microcontroller 110 proceeds to activatethe ingestible device 700. After being activated by the microcontroller110, the ingestible device 700 can engage with the programming andcharging dock 952 to receive the operating instructions. The operatinginstructions may be received via the USB connection port 962 orwireless.

In some embodiments, the base station 950 may also include a chamberengagement dock for retrieving samples from the ingestible device 700 orinserting substances into the ingestible device 700.

The base station 950 may, in some embodiments, include LEDs forindicating a status of the programming and charging dock 952 as well ascertain commands that are received from an external computer. Forexample, the LEDs may be used to indicate Emergency Stop and Overridecommands coming from the computer when extracting or insertingsubstances into the ingestible device 700.

The programming and charging dock 952 can include one or more electricalcontacts for connecting to a programming and charging connector on thePCB 30. The power supply 160 may also be charged through the electricalcontacts on the programming and charging dock 952. It will be understoodthat the number of electrical contacts can vary for differentapplications.

While the programming and charging dock 952 is shown in FIG. 17A, itshould be understood that in some embodiments, there can be a chargingdock for charging the ingestible device 700 and a separate programmingcomponent for programming the ingestible device. The programmingcomponent can be a radio transceiver or an infrared (IR) transceiver.For example, the IR transceiver may operate using modulated infraredlight (e.g., between the wavelengths step 850 to 930 nm). The radiotransceiver may operate using the Zigbee™ protocol or the ANT™ protocoldepending on the particular type of the transceiver at the base station950.

The USB connection port 962 can be connected to an external computingdevice via a USB cable. The external computing device may be a desktopcomputer, a laptop, a tablet and the like. A graphical user interfacecan be provided via the external computing device to enable interactionby an administrator with the ingestible device 700. The interaction caninclude various different operations, such as data transfer, controlcommunication, and other similar functions.

The operational instructions may include data identifying a mode ofoperation (e.g., a type of task, such as collecting of samples and/orreleasing of substances), operating parameters (e.g., sampling times,sampling intervals, error logging, and sampling locations.), parametersfor managing peripheral devices in the ingestible device 700 andoperating parameters associated with performing a particular test ortreatment procedure on the individual ingesting the ingestible device700.

Referring now to FIGS. 18A to 18C, shown therein are screenshots ofexample embodiments of user interfaces 900, 932 and 942, respectively,for interacting with the ingestible device 700. It will be understoodthat analogous interfaces 900, 932 and 942 can be used for interactingwith the ingestible devices 10, 300, 302, 304, 306, and 308, butdifferent functionalities may be provided since the ingestible devices10, 300, 302, 304, 306, and 308 do not include the storage sub-unit 702.For example, user interfaces for interacting with the ingestible devices10, 300, 302, 304, 306, and 308 may include additional controls on thesensing sub-unit 130 and may unlikely include controls on the operationof the storage sub-unit 702.

FIG. 18A illustrates a main user interface 900 for configuring theingestible device 700. As shown, the main user interface 900 includes astatus component 910, a communication component 920, a data retrievalcomponent 922, a programming definition component 930, and a motorcontrol component 940.

The status component 910 can display information corresponding to anoperational status of the ingestible device 700. For example, theoperational status can include a status of a peripheral component on theingestible device 700, a battery status 916 of the power supply 160,and/or a measurement 914 detected by the sensing sub-unit 130. Areal-time in vivo location 912 may also be displayed.

Using the communication component 920, the administrator can select acommunication port and initiate connection with the selectedcommunication port. The administrator can also initiate retrieval ofdata from the ingestible device 700 (such as from the memory storagecomponent 142) via the data retrieval component 922.

The programming definition component 930 can provide the programminginterface 932 shown in FIG. 18B. The programming interface 932 canprovide a sample acquisition control 934 for defining the sampleacquisition algorithm and a data collection control 936 for defining thedata collection algorithm. In the example shown in FIG. 18B, the sampleacquisition control 934 includes three sample acquisition definitions934(a), 934(b) and 934(c).

In the first sample acquisition definition 934(a), the ingestible device700 is to collect a first sample 60 minutes after entry into the stomachis detected and the ingestible device 700 is to expose the chamberopening 708 for 10 minutes. In the second sample acquisition definition934(b), the ingestible device 700 is to collect a second sample sixtyminutes after entry into the small intestine 454 (duodenum) is detectedand the ingestible device 700 is to expose the chamber opening 708 forten minutes. In the third sample acquisition definition 934(c), it isshown that sampling has been disabled.

The data collection control 936 in this example indicates thatreflectance data is to be collected immediately after the ingestibledevice 700 is ingested. The reflectance data may be logged every 15seconds instead of constantly. This helps to reduce the amount of datathat is collected and subsequently processed, which can also reduce theamount of energy that is needed from the battery 18 during operation.

Referring again to FIG. 18A, the motor control component 940 can providethe motor control interface 942 shown in FIG. 18C. The configuration ofthe chambers 706 can be illustrated in the motor control interface 942.In the illustrated example, the ingestible device 700 has threechambers, namely 706(a) to 706(c). Controls such as a movement typecontrol 946 and a corresponding pulse duration control 944 may also beprovided.

The microcontroller 710 can determine whether the operationalinstructions were successfully received. If so, the microcontroller 710proceeds to program and initialize the ingestible device 700 accordingto the operational instructions at step 830. If not, the microcontroller710 can request for the operational instructions to be resent.

Referring again to FIG. 16, at step 840, the ingestible device 700 isingested by the individual.

After being ingested, the microcontroller 710 may place the ingestibledevice 700 in a low energy state (e.g., sleeping state) for a predefinedwait period. During this time, the RF transceiver 722 may beintermittently turned on to poll for new instructions from the basestation 950 (e.g., new instructions to override previously receivedinstructions) and/or to transmit data to the base station 950. In someembodiments, being placed in a low energy state may comprise disablingor deactivating functions of the device for a predetermined period oftime. For example, turning off individual sensors, encoders, analog todigital converters, entire sub-units (e.g., communication sub-unit 120(FIG. 2A) or sensing sub-unit 130 (FIG. 2A)), and the like may preserveenergy and avoid draining battery 18. In some embodiments the predefinedwait period may be a predetermined period of time programmed into memory(e.g., memory storage component 142). For example, this may be set aspart of a manufacturing process or as part of being programmed by a basestation.

The predefined wait period may be provided as part of the operationalinstructions. For example, as indicated in the data collection control936 of FIG. 18C, the microcontroller 710 may initialize operation of theingestible device 700 immediately after the ingestible device 700 isingested or after a certain amount of time has elapsed since theingestible device 700 was ingested (e.g., so that the ingestible device700 may have time to travel to a target location within the individual'sbody).

Once the predefined wait period has passed or, if there is no predefinedwait period, the microcontroller 710 can initiate the sensing sub-unit130 to detect reflectance from the external environment at step 850 toidentify an in vivo location of the ingestible device 700 in accordanceof the various methods described herein, such as method 500, forexample.

At step 860, the microcontroller 710 determines whether the ingestibledevice 700 has arrived at the target location as identified in theoperational instructions, such as from the sample acquisition control934, for example. If the microcontroller 710 determines that theingestible device 700 has not arrived at the target location, themicrocontroller 710 returns to step 850.

In response to detecting that the ingestible device 700 has arrived atthe target location, the microcontroller 710 may, at step 870,initialize operation of the ingestible device 700 according to theoperational instructions.

For example, according to the sample acquisition definition 934(a), theingestible device 700 collects a sample after entry into the stomach isdetected. Therefore, the microcontroller 710 initiates collection of thefirst sample in response to the processing module indicating arrival inthe stomach based on the reflectance data collected by the sensingsub-unit 130 in accordance to the methods described herein.

After the ingestible device 700 completes the task associated with thesample acquisition definition 934(a), the microcontroller 710 determinesif all the operational instructions have been completed at step 880.

If the operational instructions have not been completed, themicrocontroller 710 returns to step 850. For example, after theingestible device 700 collects the first sample, the microcontroller 710can proceed according to the operational instructions to collect theremaining samples. In respect of the second sample, the microcontroller710 will initiate collection of the second sample in response to theprocessing module indicating arrival into the small intestine 454 (atstep 860) in accordance with the sample acquisition definition 934(b).After the ingestible device 700 collects the second sample, themicrocontroller 710 will return to step 850.

If the operational instructions have been completed, or the ingestibledevice is unable to continue its operation, the ingestible device 700can be retrieved (at step 890). The microcontroller 710 may place allperipherals into a low-energy state to conserve power.

At retrieval, the ingestible device 700 may be subject to furtheranalysis depending on its programmed task. For example, if theingestible device 700 was programmed for collecting samples from theindividual, the ingestible device 700 may be retrieved so that itscollected samples are further analyzed. Generally, the samples in theingestible device 700 may be extracted through manual pipetting oranother suitable technique, which may be automated, as is known by thoseskilled in the art. The extracted samples can be analyzed using varioustechniques, such as but not limited to, biochemical analysis, forexample.

It will be understood that the steps and descriptions of the flowchartsof this disclosure, including FIG. 16, are merely illustrative. Any ofthe steps and descriptions of the flowcharts, including FIG. 16, may bemodified, omitted, rearranged, performed in alternate orders or inparallel, two or more of the steps may be combined, or any additionalsteps may be added, without departing from the scope of the presentdisclosure. For example, the ingestible device may be provided withdefault programming during the manufacturing process, or operatinginstructions may be encoded onto the device prior to activation.Furthermore, it should be noted that the steps and descriptions of FIG.16 may be combined with any other system, device, or method described inthis applications, and any of the ingestible devices or systemsdiscussed in this application could be used to perform one or more ofthe steps in FIG. 16.

Referring now to FIG. 19, shown therein is a view of another exampleembodiment of an ingestible device 1900. Similar to the other ingestibledevices (e.g., the ingestible devices 10, 300, 302, 304, 306, 700, and2500), the ingestible device 1900 may be used for identifying a locationwithin the gastrointestinal tract. The embodiment of the ingestibledevice 1900 is configured to autonomously determine whether it islocated in the stomach, the small intestine, or the large intestine byutilizing sensors operating with different wavelengths of light.Additionally, the ingestible device 1900 can discern whether it islocated within certain portions of the small intestine or largeintestine, such as the duodenum, the jejunum, or the caecum.

The ingestible device 1900 may have the same general shape andconstruction of other ingestible devices discussed in this application(e.g., the ingestible devices 10, 300, 302, 304, 306, 700, and 2500),and it will be apparent that the disclosure related to the ingestibledevice 1900 may be combined with the disclosure related to any otheringestible device discussed in this application. For example, individualtypes of sensor configurations, materials, device housing, electronics,functionality, and detection algorithms described in relation toingestible devices 10, 300, 302, 304, 306, 700, and 2500 may be used insome embodiments of the ingestible device 1900.

For example, the ingestible device 1900 may have a housing comprising afirst end portion 14 a, a second end portion 14 b, and a connecting wallportion 14 c, substantially similar to the ingestible device 10. Theingestible device 1900 may also utilize similar electrical systems orcomponents as those discussed in relation to the ingestible device 10.The ingestible device 1900 employs a sensing array constructed fromsensing sub-units, which includes the illuminators 1906 a and 1906 b,and the detector 1904. Although not all of them are shown on the figure,the ingestible device 1900 has three sets of radial illuminators anddetectors located around the circumference of PCB 1902. In someembodiments, other numbers or configurations of sensing units may beused. The ingestible device 1900 may also have a top axial sensingsub-unit 42 at the axial end of PCB 1902. In general, PCB 1902 may be ofsimilar make and construction as the other circuits discussed in thisapplication, and utilize similar types of PCB segments (e.g., PCBsegments 202 and 204) as other devices, with slight variations inilluminator and detector location. Although not visible, the ingestibledevice 1900 may also include a bottom axial sensing sub-unit located onthe PCB segment 204 of PCB 1902 substantially opposite from the topaxial sensing sub-unit.

FIG. 20 is a simplified top view and side view of an ingestible device,illustrating exemplary illuminator or detector locations. FIG. 20 maycorrespond to any number of ingestible devices, although forillustrative purposes we will refer to ingestible device 1900. Theingestible device 1900 as depicted features a sensor array, which isillustrated as comprising three radial detectors, 2002 a, 2002 b, and2002 c, along with three radial illuminators, 2004 a, 2004 b, and 2004 cproducing illumination. A similar configuration of detectors andilluminators was illustrated in FIG. 8A. Each radial illuminator andradial sensor is evenly spaced apart by approximately 60 degrees alongthe circumference of the ingestible device 1900. This positioning hasbeen found to reduce internal reflections from the illuminators due tothe housing of ingestible device 1900. However, in some embodiments,other arrangements of illuminators and detectors may be used to similareffect, such as the arrangements described by the ingestible devices 10,300, 302, 304 and 306.

The radial illuminators 2004 a, 2004 b and 2004 c are able to produceillumination at a plurality of different wavelengths, and in someembodiments of the ingestible device 1900 they may be implemented byusing Red-Green-Blue Light-Emitting diode packages (RGB-LED). Thesetypes of RGB-LED packages are able to transmit red, blue, or greenillumination. The radial illuminators 2004 a, 2004 b and 2004 c of theingestible device 1900 are each configured to transmit a particularwavelength simultaneously, sending illumination from the device inmultiple different radial directions. For example, when the ingestibledevice 1900 is configured to transmit red light, all three radialilluminators may transmit red light simultaneously. Based on theenvironment surrounding the ingestible device 1900, a portion of thelight may be reflected from the environment, and the resultingreflectance may be detected by the radial sensors 2002 a, 2002 b, and2002 c.

Similar to the sensors discussed in relation to the ingestible device10, the radial sensors 2002 a, 2002 b, and 2002 c may comprisephoto-detectors that convert received light into an electrical signal.This signal may then be transmitted to an analog-to-digital converter(ADC), and the resulting digital signal may be manipulated by aprocessor or microcontroller (e.g., the microcontroller 110 located onPCB 30).

In some embodiments, the radial illuminators may each transmit differentwavelengths of light, or they may be operated to transmit light atdifferent times. For example, operating each of the radial illuminatorsindependently may allow the device to detect features on the environmentlocated at a particular side of the device.

FIG. 20 also depicts a pair of axial detectors 2006 a and 2006 b and apair of axial illuminators 2008 a and 2008 b, which may be included onsome variants of the ingestible device at substantially opposite ends ofthe device. These may be provided in similar fashion to the axialilluminator 42 i and the axial detectors 42 d described in connectionwith axial sensing sub-unit 42 of the ingestible device 10. The axialilluminators 2008 a and 2008 b are operated to transmit illumination insubstantially opposite directions. In some embodiments, the axialilluminators 2008 a and 2008 b, are configured to transmit illuminationin the infrared spectrum, but in some embodiments other wavelengths oflight may be used, such as white light comprising a range of wavelengthscovering the full visible spectrum.

Similar to the radial illuminators 2004 a, 2004 b and 2004 c, the axialilluminators 2008 a and 2008 b may be configured to transmit lightsimultaneously, but in some embodiments they may be adapted to transmitlight at different wavelengths, or to transmit light at different timesor in an alternating fashion. Depending on the environment surroundingthe ingestible device 1900, a portion of the illumination transmitted bythe axial illuminators 2008 a and 2008 b may be detected by the variousdetectors located on the device, such as axial detectors 2006 a and 2006b.

During transit of the ingestible device 1900 through thegastrointestinal tract, the ingestible device 1900 is configured toperiodically take sets of sensor data. This is done by flashingdifferent types of illumination in a predetermined sequence, andobtaining reflectance data for each flash. Every time it takes sensordata, the ingestible device 1900 may first transmit a signal to transmitred illumination from the illuminators 2004 a, 2004 b, and 2004 c, anddetect the resulting reflectance from the detectors 2002 a, 2002 b, 2002c. The amount of light detected in the reflectance is then quantified(e.g., by using the Analog-to-Digital converter 116), and stored inmemory within the ingestible device. The ingestible device 1900 may thenrepeat this process with blue illumination, and green illumination. Insome embodiments, the ingestible device may complete the data set bytransmitting white or infrared illumination from axial illuminators(e.g., the axial illuminators 2008 a and 2008 b), detecting a resultingreflectance using axial or radial detectors (e.g., the axial detectors2006 a and 2006 b), quantifying the data and storing it within thedevice memory. In some embodiments other types of temperature, pH,voltage, or other sensors may be provided to the ingestible device, andmeasured values of these sensor outputs may also be included in thesensor data set.

FIG. 21 depicts the wavelengths of light used in some embodiments of thedevice, and how different wavelengths of light may interact with theenvironment surrounding the ingestible device, in accordance with someembodiments. As an ingestible device (e.g., the ingestible device 1900)transits through a gastrointestinal tract, each portion of the tractwill have a different environment with different absorption andreflection properties for different wavelengths of light. For example,the stomach is typically characterized by a mixture of water, occasionalparticulates, loose tissue contact and naturally occurring mucus. Bycontrast, the small intestine is characterized by a more restrictiveenvironment, with an ingestible device coming into close contact withsmooth muscle, and the colon may feature opaque brown fecal matter.These different environments may cause variations in the absolute valueof the illumination detected by the various sensors on an ingestibledevice, and may also cause diverging signals from different wavelengthsof light.

By providing at least two wavelengths of light, the ingestible device1900 is also able to reduce variations in detected reflectance due topatient-to-patient variation. In some aspects, by comparing responselevels from multiple wavelengths of light together rather than lookingfor changes in absolute levels, the ingestible device 1900 may alsoaccount for the influence of manufacturing variability (e.g., casingopacity, photoreceptor response, mounting distances), and fluctuationsin battery voltage levels.

It is known in the art that the absorption value for tissue high in fatand/or water diverges from regular tissue at wavelengths aboveapproximately 600 nm and above (see, “Optical properties of biologicaltissues: a review,” Phys., Med. Biol., ser. 27, vol. 2, pp. 149-52,November 2013). Additionally, a sharp decline in adsorption from ˜575 to˜700 nm (i.e., light close to the red spectrum) is also observed (see,id.) By using illumination at two different wavelengths withsubstantially different absorption properties, as disclosed herein, itis possible to discern when an environment around the device consists ofbiological tissue. For example, the graph 2100 illustrates the differentabsorption properties of a blue illumination 2106, a green illumination2108, a red illumination 2110, and an infrared illumination 2112,similar to the illumination used by some embodiments of the device.

When the environment around the ingestible device 1900 causesillumination to be primarily reflected from biological tissue, like inthe enclosed space of the small intestine, the lower absorption valuefor the red illumination 2110 leads to a larger amount of redillumination 2110 being reflected by the biological tissue. As a result,higher levels of red reflectance are detected in the small intestine bythe radial sensors 2002 a, 2002 b and 2002 c of ingestible device 1900as compared to blue or green reflectance.

It is also recognized in the art that generic soft tissue influences thescattering of different wavelengths of light. As illustrated on graph2104, generic soft tissue has lower levels of scattering for increasedwavelength. In turn, the scattering of light may also influence thenumber of photons returning to the photodetector. Additionally, thescattering characteristic of soft tissue is different than alternativereflective medium (e.g., gastric fluid within the stomach versus fecalmatter in the large intestine). As described herein, the ingestibledevice 1900 that uses different wavelengths of light (e.g., the blueillumination 2106, the green illumination 2108, and the red illumination2110) is able to take advantage of these different scatteringcharacteristics as it determines a location within the gastrointestinaltract.

As a result of the above factors, in addition to other factors such asslightly differing colors in gastric fluid, bile located in the smallintestine, and brown matter near the ileocecal junction leading to thelarge intestine, the ingestible device 1900 is able to gather data at aplurality of different wavelengths as it transits the gastrointestinaltract, and differentiate the different locations within thegastrointestinal tract reliably.

In some embodiments, the ingestible device 1900 may be implemented usinga suitable RGB LED package for the radial illuminators. In someembodiments the radially mounted illuminators in the ingestible device1900 may include the SML-LX0404SIUPGUSB RGB LED. In some embodiments anadditional LED may be mounted along-side the RDB LED package to allowfor additional wavelengths, and in some embodiments an IR LED or apolychromatic white LED may be mounted in the axial position (e.g., toimplement the axial illuminators 2008 a or 2008 b) of the ingestibledevice 1900.

FIG. 22 illustrates the reflection properties of different regions ofthe gastrointestinal tract as they relate to the device. As theingestible device (e.g., the ingestible device 1900) transits throughthe gastrointestinal tract, different environments affect the overallamount of reflectance measured by the various radial sensors underdifferent circumstances. These changes in absolute levels of detectedlight do not take into account additional variations between differentwavelengths of light. Although FIG. 22 is described using an embodimentof the ingestible device 1900 equipped with radial and axialilluminators, the discussion applies to any ingestible device describedin this application (e.g., the ingestible devices 10, 300, 302, 304,306, and 700) which may have a different number or different orientationof illuminators and detectors. Additionally, in some embodiments aningestible device with only radial sensors may be used to implement someof the localization techniques described herein.

For example, image 2200 shows a longitudinal view of an ingestibledevice (e.g., the ingestible device 1900) in a stomach, and shows howthe amount of light detected by the various radial sensors on theingestible device 1900 from the various radial illuminators changesunder different conditions. The illumination 2202 being transmitted froma slight distance away from the stomach wall is reflected off the wall,into the acceptance angle of the adjacent radial detectors. This resultsin a strong amount of overall reflectance being detected. By comparison,the illumination 2204 pointing away from any kind of tissue orparticulate results in minimal light reflected back into the detectors.The illumination 2206 demonstrates that when the ingestible device 1900is too close to a surrounding wall or tissue, very little light isreflected in a manner that will be detected by the radial detectors.Finally, the illumination 2208 demonstrates that the presence ofparticulates may allow the light to reflect and scatter, causing alarger signal to be received by the radial detectors. These differenttypes of behaviors lead to differing absolute levels of light beingdetected by the ingestible device 1900 while it is in the stomach. Asdiscussed in relation to FIGS. 8-13, this also leads to a large variancein the amount of light that will be detected by the ingestible device1900.

As another example, image 2210 shows a side view of an ingestible device(e.g., the ingestible device 1900) in a stomach, and shows the amount oflight detected by the various radial sensors on the ingestible device1900 from an axial illumination. The axial illumination is reflected offa nearby stomach wall, and the resulting reflectance scatters inmultiple directions. The reflectance 2212 directed into the fluid of thestomach may be easily detected by the radial sensors. By comparison, thereflectance 2214 directed into the tissue on the side of the stomach isnot detected easily by the radial sensors.

As another example, image 2216 shows a longitudinal view of aningestible device (e.g., the ingestible device 1900) in a smallintestine, and shows how the amount of light is detected by the variousradial sensors on the ingestible device 1900 from the various radialilluminators under different conditions. The close confined space of thesmall intestine may prevent significant amounts of radial illuminationfrom being reflected back into the detectors. Similar to illumination2206, because the ingestible device 1900 is too close to the walls ofthe small intestine, very little of the illumination is able to bereflected directly into the radial detectors, resulting in a loweroverall level of illumination being detected. However, this effect canbe mitigated when red light is used, due to the wavelength absorptionproperties of the small intestine lining.

As another example, image 2218 shows a side view of an ingestible device(e.g., the ingestible device 1900) in a small intestine, and shows howthe environment alters the amount of light detected by the variousradial sensors on the ingestible device 1900 from the axialilluminators. Generally the small confined space of the small intestinewill cause the ingestible device 1900 to be oriented along thelongitudinal axis of the capsule-shaped ingestible device. Axialillumination transmitted from the end of the device has minimal tissueor particulates to be reflected from, and in combination with theenclosed space, very little axial illumination is able to be detected bythe radial sensors. As a result, minimal light from the axialilluminator is able to be detected by the radial sensors of theingestible device 1900 in the small intestine. By contrast, in theenvironment of the stomach or the large intestine, the axialillumination will result in a greater reflectance being detected. Insome embodiments, the axial illuminator of the ingestible device 1900may be configured to transmit wavelengths of light that can be detectedby the radial detectors, such as white light. In some embodiments, theradial detectors and axial illuminator may be designed so that lighttransmitted by the axial illuminator is unable to be easily detected bythe radial illuminator. For example, the axial illuminator may beconfigured to transmit light in the infrared wavelength, and the radialdetectors may be configured to receive light in the visible spectrum.

FIG. 23 illustrates the detecting light reflected from different regionsof the gastrointestinal tract as they relate to an ingestible device(e.g., the ingestible device 1900). Particularly, FIG. 23 illustrateshow radial illumination may be reflected by the environment, andreceived by the various radial detectors. This description may becombined with or supplemented by the description in conjunction withFIGS. 8A-8C and FIG. 22, which describe similar subject matter. In someaspects, the radial illuminators on an ingestible device (e.g., theradial illuminators 2002 a, 2002 b, and 2002 c (FIG. 20) of theingestible device 1900 (FIG. 19)) transmit the illumination 2308 awayfrom the housing of the device in approximately a 120-degree arc. Insome embodiments, this arc may be smaller or larger depending on thematerials and components used to construct the ingestible device.Similarly, a radial detector (e.g., radial detectors 2002 a, 2002 b and2002 c (FIG. 20)) will have a detector acceptance range 2310, and lighttravelling towards a radial detector of the ingestible device (e.g., theradial detectors 2002 a, 2002 b, and 2002 c (FIG. 20)) within thedetector acceptance range 2310 will be able to be detected by the radialdetectors. In some aspects, the acceptance range is approximately a120-degree arc, but it will be understood by one skilled in the art thatthis depends on a number of factors, including the configuration of theinternal components of the ingestible device, and optical considerationssuch as the index of refraction of the device housing, the index ofrefraction of the immediate surrounding environment, and the resultingacceptance angle of the interface between the device housing and thesurrounding environment.

An open environment 2300 in the absence of any type of reflectivesurface or particulates is unable to deflect light transmitted as partof illumination 2308. As a result, the light travels in a relativelystraight path away from the device, and essentially none of theillumination 2308 will be detected by the radial detector.

An environment with particulates 2302 may result in illumination beingreceived by a radial detector after being reflected off smallparticulates. The presence of small irregular particulates around thedevice may cause illumination to be reflected in a plurality ofdirections, causing a portion of the illumination to be redirected intothe acceptance angle of the radial detector. Based on the distancebetween the radial illuminator and the particulates, a varying amount ofillumination may be detected by the radial detectors. For example, theparticulate 2316 is within the arc of the illumination 2308, and isrelatively close to the source of the illumination 2308. As a result, aportion of the light contained in the illumination 2308 will bereflected off the particulate 2316, and redirected into the radialdetector acceptance range 2310. By comparison, the particulate 2318 isstill within the arc of the illumination 2308, but it is further awayfrom the source of the illumination 2308. As such, a smaller amount oflight will be reflected off the particulate 2318, diverted into thedetector acceptance range 2310, and detected by the radial detector. Forexample, this may be as a result of both decreased optical intensity aslight travels further away from the illumination source, and also due topossible shadowing caused by other particulates (e.g., the particulate2316 in the path between the illumination source and the particulate2318) or cloudiness in the fluid or other matter surrounding the device.

An environment near a stomach wall 2304 demonstrates how illuminationmay be received by a radial detector after being reflected off stomachtissue a slight distance away from the device. Although this isdescribed in relation to stomach tissue, this may apply to any type oforgan tissue a sufficient distance away from the device. At a sufficientdistance away from the stomach, a substantial amount of the illumination2308 will be reflected off the stomach lining 2312, and diverted intothe detector acceptance range 2310. As a result, a large portion of theillumination 2308 is able to be detected by the radial detector. It willbe apparent that in an actual stomach, the position of an ingestibledevice will move and change, leading to large variations in the amountof light detected, as well as a larger amount of light being received onaverage. In some embodiments (e.g., the ingestible devices 10, 300, 302,304, 306, 700, 1900) both the large variability in the absolute amountof light detected, or the average amount of light detected, may be usedto determine that the ingestible device is located in the stomach.

A small intestine environment 2306 may result in small amounts ofillumination being received by a radial detector. Generally, theenclosed space of the small intestine lining 2320 will prevent theillumination 2308 from reaching the radial detector. The illumination2308 is reflected by the small intestine lining 2320, but because of thepositioning, very little of the light in the illumination 2308 is ableto be directly reflected into the radial detector acceptance range 2310.A small amount of light will continue to reflect back and forth betweenthe small intestine lining 2320 and the housing of the ingestibledevice, and will finally reach the appropriate acceptance range 2310where it may be detected, but generally this leads to a very smallamount of overall light being detected. However, due to the reddishcolor of the small intestine, red illumination may be better able toreflect multiple times and reach the radial detector as compared togreen or blue light.

FIG. 24 illustrates typical reflectances measured in different regionsof the gastrointestinal tract. The ingestible device 1900 primarilyfunctions by keeping track of a current region of the gastrointestinaltract surrounding the device, and by monitoring the environment aroundthe device to determine changes from one region to another. In someembodiments, the ingestible device 1900 may autonomously identify alocation of the device within the gastrointestinal tract of a body bymonitoring the changes from one region to another. In some embodiments,the ingestible device 1900 functions as a state machine, wherein thestate tracks the current portion of the gastrointestinal tract where theingestible device 1900 is located. The ingestible device 1900 maydistinguish between various locations including a starting point outsidethe body 2402, a stomach 2404, a duodenum 2406, a jejunum 2408, a caecum2410, a large intestine 2412, and an exit point outside the body 2414.In some embodiments the ingestible device 1900 may distinguish onlybetween a stomach 2404, a small intestine, (e.g., a small intestinewhich may include the duodenum 2406 and the jejunum 2408), and a largeintestine (e.g., a large intestine which may include the caecum 241, andthe large intestine 2412). In some embodiments the ingestible device1900 may distinguish between a subset of the above mentioned locations,and/or a combination of the above locations and other locations, such asa mouth, an ileum, or a rectum.

In some embodiments the ingestible device 1900 may transmit illuminationat a first wavelength towards an environment external to a housing ofthe ingestible device, detect the resulting reflectance, and store areflectance value in a data set based on the first reflectance. Forexample, the ingestible device may transmit illumination at a redwavelength, detect a red reflectance, and store a reflectance value in ared data set that indicates how much light was measured in the redreflectance. The ingestible device 1900 may repeat this process for anumber of other types of illumination at other wavelengths, such asblue, green, or infrared wavelengths. The ingestible device 1900 maykeep track of reflectance data gathered from reflectance sensors (i.e.,radial detectors) in each of the red, green, blue and IR spectra.

This data may then be used by an onboard microprocessor to perform alocalization algorithm that identifies a pyloric transition 2416 fromstomach 2404 to the duodenum portion of the small intestine 2406; atreitz transition 2418 from the duodenum 2406 to the jejunum 2408; anileocaecal transition 2420 from the ileum (i.e., the area located at theend of the jejunum 2408) to the caecum 2410; and a caecal transition2422 from the caecum 2410 to the rest of the large intestine 2412. Thiscan be accomplished by using a plurality of different wavelengths oflight, measuring the different amounts of light reflected by theenvironment around the device, and determining the location of thedevice in view of the different optical absorption properties of thedifferent regions of the gastrointestinal tract. The ingestible device1900 may gather this data at periodic intervals, and in some embodimentsthese may be spaced one second to 10 minutes apart. For example, theingestible device 1900 may take new data samples a few times a minuteuntil it detects a location in the small intestine, and then it may takenew data samples every few minutes. While not taking samples, theingestible device 1900 may enter a dormant sleeping or standby state topreserve energy reserves.

In some embodiments, the ingestible device 1900 may detect the variouslocations and transitions identified in FIG. 24 by using an appropriatesensor array (e.g., as depicted in FIG. 20) made up of a plurality ofradial and axial light-emitting diode (LED)/phototransistor pairs thatfunction as reflectance sensors. In some embodiments, the ingestibledevice 1900 may also include a temperature sensor and internal real timeclock (RTC) oscillator for keeping time. It will be understood to oneskilled in the electrical arts that a temperature sensor and anoscillator are easily acquired components that can be integrated intothe circuitry of a PCBA (e.g., PCBA 202) using known techniques.

The ingestible device 1900 described in relation to FIG. 24 has a set ofradial illuminators (e.g., the illuminators 2004 a, 2004 b and 2004 c(FIG. 20)) capable of transmitting light in the red, green, and bluespectra, as well as an axial illuminator (e.g., the axial illuminator2008 a (FIG. 20)) capable of transmitting light in the infraredspectrum. The ingestible device 1900 may then have a set of detectors(e.g., the radial detectors 2002 a, 2002 b, and 2002 c (FIG. 20))capable of measuring the reflectance of these different types of light.However, in some embodiments, particular transitions may be detectedusing as few as two different wavelengths of light, and the hardwareused to implement the illuminators and detectors may be changedappropriately. For example, identifying a pyloric transition, a trietztransition, and a caecal transition may be accomplished by comparing ared reflectance to either a green or blue reflectance.

As the ingestible device 1900 transits through the different regions ofthe gastro-intestinal tract depicted in FIG. 24, the ingestible device1900 may gather sensor data over time. The device software stored inmemory (e.g., stored on memory sub-unit 140 (FIG. 2A)) and executed by aprocessor or microcontroller (e.g., microcontroller 110 (FIG. 2A)) keepstrack of all measurements and events. An onboard algorithm, furtherdescribed below, is then applied to determine the ingestible device 1900position by monitoring the various locations and transitions. Thealgorithm has been designed to move through states that represent theanatomical location of the ingestible device 1900 (e.g., the start 2402,the stomach 2404, the duodenum 2406, the jejunum 2408, the caecum 2410,the large intestine 2412, and the exit 2414) by using sub-algorithms toidentify anatomical transitions (e.g., entry to the stomach, a pylorictransition 2416, a treitz transition 2418, a ileocaecal transition 2420,a caecal transition 2422, and an exit from the body, 2414. In someembodiments, the ingestible device 1900 will have a state whichcorresponds to a known or estimated location of the device, and based onthe current state, the ingestible device 1900 may run an algorithm tosearch for the next state transition. For example, when the ingestibledevice 1900 knows it is in the stomach (e.g., the stomach 2404), it willidentify the current state as the “STOMACH” state. The ingestible device1900 will then perform an algorithm to identify a pyloric transition(e.g., the pyloric transition 2416). Once a pyloric transition isidentified, the ingestible device 1900 may determine that it is nowlocated in the duodenum portion of the small intestine (e.g., theduodenum 2406), and the state will switch to the “DUODENUM”. In someembodiments the ingestible device may determine a state by estimating orinferring the current location of the device. For example, in someembodiments the ingestible device 1900 may assume that in the absence ofa detected state transition, the location of the device has remained thesame, and maintain the same state. As another example, when the deviceis first activated, it may assume that it is at an initial startingstate external to the body (e.g., the start 2402).

FIG. 24 also shows a plot of the detected reflectance due toillumination at different wavelengths, and a temperature measured by thedevice, over time. Temperature 2424 changes to a temperature near bodytemperature soon after the ingestible device 1900 enters the body, andchanges back to a different ambient temperature once the ingestibledevice 1900 exits the body. Detected green reflectance 2426 and bluereflectance 2428 behave similarly, having a low response throughout theduodenum 2406, jejunum 2408, caecum 2410, and large intestine 2412. Forthe purposes of the algorithms described in connection with theingestible device 1900, the detected green reflectance 2426 and thedetected blue reflectance 2428 are largely interchangeable, although forsimplicity we may refer simply to the detected green reflectance 2426.

The detected red reflectance 2430 has a more varied response over timethan the detected green and blue reflectances 2426, 2428. The detectedred reflectance 2430 is lower in the stomach 2404, and rises during thepyloric transition 2416 as the ingestible device 1900 enters theduodenum portion of the small intestine 2406. The detected redreflectance 2430 rises as it progresses through the duodenum, reachingits apex near the treitz transition 2418 as the ingestible device 1900nears the jejunum 2408. While the ingestible device 1900 transits thejejunum 2408 and the caecum 2410, the detected red reflectance 2430reduces, reaching a local minimum near the caecal transition 2422.

The detected infrared reflectance 2432 depicted in FIG. 24 is a resultof an axial illuminator and axial detector, as opposed to the otherdetected reflectances 2426, 2428 and 2430, which are typically measuredby radial detectors. The detected infrared reflectance 2432 has asimilar behavior to the detected red reflectance 2430 during transitthrough the stomach, duodenum and jejunum. However, the detectedinfrared reflectance 2432 reaches a low point near the ileocaecaltransition 2420, and the detected infrared reflectance increases in thecaecum 2410 before settling to a large value during transit through thelarge intestine 2412.

In some embodiments the ingestible device 1900 may determine when astate transition has occurred by comparing a reflectance (e.g., the redreflectance 2430) to another reflectance (e.g., the green and bluereflectances 2426, 2428). For example, a pyloric transition (e.g., thepyloric transition 2416) may be detected when the red or the infraredreflectances 2430, 2432 have diverged from the green or the bluereflectances 2426, 2428, in a statistically significant manner. In someembodiments, determining whether two reflectances (e.g., the redreflectance 2430 and the green reflectance 2426) have diverged in astatistically significant manner may involve determining if a samplemean of the red reflectance data and a sample mean of the greenreflectance data are statistically different using an appropriatestatistical technique. For example, this may be done by performing at-test and determining if the two sample means are statisticallydifferent with a significance level of p<0.05. In some embodiments, thistest may be performed on the most recent values recorded in thereflectance data sets. In some embodiments, the data sets may be cleaned(e.g., by detecting and removing outliers) before being used to make astatistical comparison. It will be understood to one skilled in the artthat various test statistics and statistical techniques may be used todetermine statistical significance. The techniques may include, but arenot limited to, comparisons of means, standard deviations and variances,t-tests, f-tests, data cleaning methods, machine learning techniques,feature extraction, and the like, or any combination thereof.

It will also be understood to one skilled in the art that identifyingrelationships between one or more reflectances, such as determining whentwo reflectances converge or diverge, or when individual reflectancesreach local maximum or minimum values, can be done using various knownstatistical techniques or ad-hoc techniques. For example, one ad-hocmethod may determine a statistically significant divergence byevaluating when a simple moving average of the red reflectances 2430 istwice the simple moving average of the green reflectances 2426. Asanother example, in some embodiments the ingestible device 1900 mayintegrate the difference between weighted or simple moving averages, anddetermine when the integral is larger than a threshold value todetermine that two reflectances have diverged in a statisticallysignificant way. The threshold value itself may be a multiple of one ofthe simple moving averages, such as ten times the simple moving averageof the last 50 data points in the green reflectance data set 2426. Insome embodiments, the ingestible device 1900 may determine statisticalsignificance when the measured red reflectance 2430 is larger than ameasured green reflectance 2426, for example, 10-times larger. In someembodiments, the ingestible device may increment a counter when themeasured first reflectance (e.g., the red reflectance 2430) is largerthan a measured second reflectance (e.g., the green reflectance 2426).In some embodiments, the counter may be incremented when the mean of thefirst data set (e.g., the red reflectance 2430) less a multiple of thestandard deviation of the first data set is greater than a mean of thesecond data set (e.g., the green reflectance 2430) plus a multiple ofthe standard deviation of the second data set. For example, in someembodiments a duodenum detection algorithm may increment a counter whenthe mean of the red reflectance 2430 less the standard deviation of thered reflectance 2430 is greater than the mean of the green reflectance2430 less the standard deviation of the green reflectance 2430, and thepyloric transition 2416 is detected when the counter is greater than7000. In some embodiments a caecum detection algorithm may increment acounter when the mean of the infrared reflectance 2432 less the standarddeviation of the infrared reflectance 2432 is greater than the mean ofthe green reflectance 2430 less the standard deviation of the greenreflectance 2430, and the ileocaecal transition 2420 is detected whenthe counter is greater than 1000. In some embodiments, the ingestibledevice 1900 may reset counters periodically. In some embodiments,because the counter is unit-less and the number of counts may depend onfrequency with which the device takes samples, the ingestible device1900 may detect transitions when the counter reaches a differentthreshold. For example, in some embodiments the ingestible device 1900may take new data at a relatively fast speed, and the duodenum detectionalgorithm may detect a state transition when the counter is greater than700.

As the ingestible device 1900 transits through the portions of thegastrointestinal tract, it utilizes a localization algorithm todetermine its location. In some aspects, this is done by selecting amongthe various state of the device that corresponds to one of the grossanatomical structures of the gastrointestinal tract that are stored inthe device. The states tracked by the ingestible device 1900 and thesub-algorithm implemented to track state transitions are describedaccording to some embodiments below.

GI State: START_EXTERNAL. This state is entered when the device isprogrammed and begins logging operations. For example, at the start2402, before being administered to a patient, the ingestible device 1900may be set to the START_EXTERNAL state. In some embodiments theingestible device 1900 may include a communication sub-unit (e.g., thecommunication sub-unit 120 (FIG. 2A) described in connection with theembodiment of the ingestible device 10 (FIG. 1)), and can communicatewith a base station (e.g., base station 950 (FIGS. 17A to 17C)). Whenthe ingestible device 1900 is connected with the base station, it may beset to the START_EXTERNAL state by default. In some embodiments theSTART_EXTERNAL state may also be the default state whenever ingestibledevice 1900 is first activated.

GI State: STOMACH. This state is entered once the ingestible device 1900determines it has entered the stomach 2404. In some embodiments, theingestible device 1900 may include a temperature sensor for measuringthe temperature of the environment around the device. The ingestibledevice 1900 may determine that it has transitioned into the stomach oncethe measured temperature is close to the internal body temperature ofthe patient. For example, for a typical human patient the internal bodytemperature is close to 37 degrees Celsius, the ingestible device 1900may then determine that it has entered the stomach when the temperaturesensor measures a temperature within a range of 30-40 degrees. In someembodiments, the temperature range may be manually set by programmingthe ingestible device 1900 using a base station. In some embodiments theingestible device 1900 may be adapted to also use the radial and axialdetectors (e.g., the detectors 2002 a, 2002 b, 2002 c, 2006 a and 2006b) to determine a change in the level of ambient light in theenvironment. After measuring a reduction in the light in the surroundingenvironment, a reduction which would be typical of an ingestible devicebeing swallowed, the ingestible device 1900 may determine that it hasentered the body and automatically determine that it has transitionedfrom the START_EXTERNAL to the STOMACH state. This may be particularlyuseful when the ingestible device 1900 does not include a temperaturesensor, or when the temperature of the ambient environment is similar tothe internal body temperature.

GI State: DUODENUM. This state is entered once the ingestible device1900 detects a pyloric transition 2416 from the stomach 2404 to theduodenum 2406. This may be accomplished by using a duodenum detectionsub-algorithm, which operates automatically whenever the ingestibledevice 1900 is in the STOMACH state. In some aspects, the duodenumdetection sub-algorithm may determine when a red or infrared reflectance2430, 2432 diverges from a green or a blue reflectance 2426, 2428 in astatistically significant way. It will be understood to one skilled inthe art that various statistical, filtering, or ad-hoc techniques can beused to identify this point. For example, this may be calculated usingvarious known statistical techniques or ad-hoc techniques, such asperforming a t-test using, for example the last 30 data points, or bydetermining when a red or infrared reflectance 2430, 2432 is, forexample, twice the value of a green or a blue reflectance 2426, 2428. Insome aspects, the duodenum detection sub-algorithm compares thedifference between the detected red spectrum 2430 versus that of thedetected green or blue spectrum, and marks a transition when thedifference is larger than a threshold value. In some aspects, thealgorithm uses the mean of multiple data points in the detected redreflectance data and the detected green reflectance data, takes thedifference between the two means, and compares the difference to athreshold value. For example, the ingestible device 1900 may beconfigured to take new data samples every 15 seconds, and to take asimple moving average of the most recent 40 samples to determine a meanred reflectance and a mean green reflectance. In some embodiments, theduodenum detection algorithm may involve taking the integral of thedifference between the mean of the red reflectance and the mean of thegreen reflectance. For example, in some aspects, taking the mean of thedifference between the two simple moving averages may assist theingestible device 1900 in avoiding false transitions, or assist indetecting a transition sooner. Other aspects of the duodenum detectionalgorithm are illustrated in FIG. 33. Although the above discussion usesdetected red reflectance 2430 and detected green reflectance 2426, insome embodiments a similar algorithm may be performed using eitherdetected infrared reflectance 2432 in place of detected red reflectance2430, or by using detected blue reflectance 2428 in place of thedetected green reflectance 2426.

GI State: JEJUNUM. This state is entered once a treitz transition 2418between the duodenum 2406 and the jejunum 2408 is detected. In someaspects, this may be detected by the use of a jejunum detectionsub-algorithm, which may be performed automatically once the ingestibledevice 1900 is in the DUODENUM state. In some aspects, the jejunumdetection sub-algorithm may determine when a red or infrared reflectance2430, 2432 either reaches a local maximum, or when the differencebetween a red or infrared reflectance 2430, 2432 and a green or a bluereflectance 2426, 2428 is constant in a statistically significant way(e.g., as a result of the ref reflectance 2430 reaching a local maxima).It will be understood to one skilled in the art that variousstatistical, filtering, or ad-hoc techniques can be used to identifythis point. For example, this may be calculated by finding when thederivative or finite difference of the red or infrared reflectance 2430,2432 reaches zero, or changes signs. In some aspects, the jejunumdetection sub-algorithm identifies the point of maximal reflected lightin the red spectrum versus that of the green and blue spectrum. In someaspects, the jejunum detection sub-algorithm may compare the detectedred reflectance value to a threshold, and in some aspects, the algorithmevaluates the difference between a simple moving average of the detectedred reflectance 2430 and a simple moving average of the detected greenreflectance 2426 or detected blue reflectance 2428. In some embodiments,the detected infrared reflectance 2432 may be used instead of thedetected red reflectance 2430.

GI State: CAECUM. This state is entered once the ingestible device 1900detects an ileocaecal transition 2420 from the ileum (i.e., the portionof the gastrointestinal tract at the end of the jejunum 2408) to thecaecum 2410. In some aspects, this may be detected by using a caecumdetection sub-algorithm. In some aspects, the caecum detectionsub-algorithm may determine when the infrared reflectance 2430 reaches alocal minimum, or when the infrared reflectance 2430, 2432 convergeswith the green or a blue reflectance 2426, 2428 in a statisticallysignificant way (e.g., as a result of the ref reflectance 2430 reachinga local maxima). It will be understood to one skilled in the art thatvarious statistical, filtering, or ad-hoc techniques can be used toidentify this point. For example, in some embodiments this may becalculated by finding when the derivative or finite difference of theinfrared reflectance 2432 reaches zero, or finding when a simple movingaverage of the difference between the infrared reflectance 2430 and thegreen reflectance 2426 is statistically equal to zero. Thissub-algorithm may be performed automatically when the ingestible device1900 is in the JEJUNUM state. In some aspects the caecum detectionsub-algorithm may compare the detected red reflectance 2430 or thedetected infrared reflectance 2432 and the detected green reflectance2326 or the detected blue reflectance 2328 to find a point where thedifference is less than a first threshold value. Similar to ourdiscussion of the other sub-algorithms, in some aspects this algorithmmay use a simple moving average as opposed to raw data points. In someaspects, a caecum detection sub-algorithm may integrate the differencebetween mean reflected light in the infrared spectrum versus that of thegreen spectrum and tests for a difference less than a detectionthreshold. In some embodiments, other techniques may be incorporatedinto the caecum detection sub-algorithm, such as those illustrated inFIG. 32.

GI State: LARGE INTESTINE. This state is entered once the ingestibledevice 1900 detects a caecal transition 2422 from the caecum 2410 to theremainder of the large intestine 2412. In some aspects, this may bedetected by using a large intestine detection sub-algorithm. Thissub-algorithm may be performed automatically when the ingestible device1900 is in the CAECUM state. In some aspects, the large intestinedetection sub-algorithm may determine when the red reflectance 2430reaches a minimum and converges with the green or the blue reflectances2426, 2428, in a statistically significant way, or when the infraredreflectance 2432 rises and levels off at a sufficiently large value in astatistically significant way. It will be understood to one skilled inthe art that various statistical, filtering, or ad-hoc techniques can beused to identify this point. For example, in some embodiments this maybe calculated by finding when the sample mean of the red reflectance2430 is statistically the same as the blue or green reflectances 2426,2428. In some embodiments, this may be done by calculating when theinfrared reflectance 2432 is, for example, an order of magnitude largerthan the other reflectances, or when a finite difference or derivativeof the infrared reflectance 2432 has been reduced, for example, to 20%of its maximum value. In some aspects, a large intestine detectionsub-algorithm may compare the detected red reflectance 2430 with thedetected green reflectance 2426 to determine when the difference isbelow a threshold value. Similar to our discussion of the othersub-algorithms, in some aspects this algorithm uses a simple movingaverage as opposed to raw data points. In some embodiments, an advancedversion of the algorithm integrates the difference between a simplemoving average of the detected red reflectance 2430 and the detectedgreen reflectance 2426 and tests for a difference less than a thresholdvalue. For example, as each new set of data is acquired, the ingestibledevice 1900 may compute an updated simple moving average. A discreetintegral may then be computed by summing the difference between apredetermined number of the most recent simple moving averages. It willbe apparent to one skilled in the art that the integral may be computedseveral different ways, some of which may be more or lesscomputationally efficient than others. For example, taking thedifference between appropriately weighted moving averages, or adding andsubtracting the newest and oldest simple moving average to thepreviously computed integral, may produce an equivalent result. In someembodiments the detected infrared reflectance 2432 being above athreshold value may be incorporated into the large intestine detectionsub-algorithm.

GI State: END_EXTERNAL. This state is entered after the ingestibledevice 1900 detects a transition from the large intestine 2412 to theexit 2414. In some aspects, the ingestible device 1900 may detect thisthrough an exit detection sub-algorithm, which may run automaticallywhen the ingestible device is in the LARGE_INTESTINE state. In someembodiments, the ingestible device 1900 may be equipped with atemperature detector, and the exit detection sub-algorithm may simplycheck for a change in the measured temperature away from the internalbody temperature of the patient. For example, if the ingestible device1900 detects a temperature below 30 degrees Celsius, or outside therange of 30-40 degrees Celsius, it may determine that it has naturallyexited the body of the patient.

In some embodiments, the ingestible device 1900 may measure the overallamount of time that has passed since the ingestible device 1900 wasfirst activated in the START state. In some aspects, this measuredamount of time may be incorporated into the exit detectionsub-algorithm. For example, by determining that a significantly longperiod of time has passed (e.g., fifteen hours), the ingestible devicemay determine that an altered temperature reading is a result of anatural exit from the body rather than a temporary disturbance (e.g.,being lodged in the stomach as a patient drinks cold water). In someembodiments, the ingestible device 1900 may also use the radial or axialdetectors (e.g., detectors 2002 a, 2002 b, 2002 c, 2006 a or 2006 b) tomeasure ambient light to help determine an exit from the body. In someembodiments, the ingestible device 1900 may also enter the END EXTERNALstate and become dormant after an extremely long period of time haspassed. In some aspects this may serve both as a means for preservingenergy, and as a failsafe. For example, regardless of the otherindicators, the ingestible device 1900 may enter the END EXTERNAL stateand become dormant after seven days have passed.

It will be understood that the locations and transitions discussed inrelation to FIG. 24 are for illustrative purposes, and should not beconsidered limiting. Furthermore, the systems, devices, and methodsdescribed herein may be used to identify a number of other locations ortransitions (e.g., identifying the ileum and a transition between theduodenum and the ileum by comparing the different wavelengths of lightto threshold values). Additionally, some embodiments of the device mayreduce the number of states, by consolidating the DUODENUM, JEJUNUM, andCAECUM into a single SMALL INTESTINE state. In this case, the duodenumdetection sub-algorithm determines when the ingestible devicetransitions into the SMALL INTESTINE state, and a caecum detectionsub-algorithm determines when the ingestible device transitions awayfrom the SMALL INTESTINE state into the LARGE INTESTINE state. In someembodiments, other states, such as a MOUTH, ILIEUM, or COLON state mayalso used by the device.

Although we refer specifically to the ingestible device 1900 inconnection with FIG. 24, it will be understood that any of theingestible devices in this application may be used. This includes, forexample, the ingestible devices, 10, 300, 302, 304, 306, 700, as well asthe ingestible device 2500 discussed in connection with FIGS. 26-28, aswell as the other ingestible devices having various combinations offeatures found on the aforementioned devices.

FIG. 25 illustrates an external view of another embodiment of theingestible device that may be used for autonomously identifying alocation within the gastrointestinal tract, and autonomously samplingfrom the gastrointestinal tract or releasing medicament into thegastrointestinal tract. Similar to the example ingestible device 700,example ingestible device 2500 depicted in FIG. 25 is configured toperform the location detection methods described herein, and to obtainsamples and/or carry substances including medicaments and therapeutics.During transit through the gastrointestinal tract, the ingestible device2500 may obtain a number of samples based on the determined location ofthe device, or at a predetermined time after having established alocation of the device. The systems, devices, and methods used byingestible device 2500 are described with reference to FIGS. 25-35,although features of the ingestible device 2500 may be combined with anyother portion of this application. Multiple components of the ingestibledevice 2500 are interchangeable with the components used in describingthe ingestible devices 10, 300, 302, 304, 306, 700, and 1900. Therefore,components that are similar to the already described ingestible deviceswill not be described in great detail, and instead the focus will be ondifferentiating features of this embodiment. It should also beunderstood that any of the ingestible devices described in thisapplication (e.g., the ingestible devices 10, 300, 302, 304, 306, 700and 1900), may be modified to include the systems, devices, and methodsdiscussed in relation to the ingestible device 2500.

An external view of the ingestible device 2500 is depicted in FIG. 25.The ingestible device 2500 is depicted with a housing comprising a firstwall portion 2502 connected to first end portion 2504, and a second wallportion 2512 connected to a second end portion 2514. The first wallportion 2502 and the second wall portion 2512 are connected by aconnecting portion 2 step 510.

The first wall portion 2502 is depicted with an optically transparent ortranslucent window 2506. The window 2506 may have different opticalproperties from the rest of the first wall portion 2502, and may be moretransparent or translucent to visible and infrared light than the otherportions of the first wall portion 2502. However, in some embodimentsthe ingestible device 2500 may be adapted to use the first wall portion14 a and the first end portion 16 a from the ingestible device 10 ofFIG. 1 instead of the first wall portion 2502 and the first end portion2504. The first end portion 2504 is substantially similar to first endportion 16 a illustrated in FIG. 1; however, the first end portion 2504may have a window located at the end of the device. This window may, incertain aspects, have different optical properties from the rest of thefirst end portion 2504, and be configured to allow illumination in andout of the end where an axial sensor sub-unit may be located.

The second wall portion 2512 has an opening 2518, and is configured torotate around the longitudinal axis of the device. The opening 2518 actsas a passageway for samples from the gastrointestinal tract to enter thehousing of the ingestible device 2500, or as a passageway for amedicament stored inside of the ingestible device 2500 to be releasedinto the gastrointestinal tract. In some embodiments, a sample acquiredby ingestible device 2500 may be analyzed. A gear-motor 704 inside ofthe ingestible device 2500 is able to rotate, and cause the second wallportion 2512 to move. In some embodiments, this is done by use of amotor pinion connected to the interior of the second wall portion 2512.The motor pinion may be connected using cyanoacrylate, or any othersuitable bonding material or adhesive. The second end portion 2514 isconnected to the second wall portion 2512, and contains a small opening2516. The small opening 2516 can be used to anchor the end of thegear-motor 704. The end of the gear-motor 704 may be positioned insideof the small opening 2516, allowing it to be locked into place. In someembodiments, the second end portion 2514 will rotate along with thesecond wall portion 2512, although in some embodiments the second endportion 2514 will remain stationary as the second wall portion 2512moves. As the second wall portion 2512 moves, the opening 2518 will movewith it. In some configurations, there will be one or more chambers(e.g., the chamber 706 (FIG. 14A)) under the second wall portion 2512.As the opening 2518 moves, the chambers may become alternately exposedto the environment around the ingestible device 2500, or closed off fromthe environment around the ingestible device 2500.

The PCB 2508 used in the ingestible device 2500 has similar features andfunctionality to PCB 30 discussed in relation to FIGS. 2A-2E. However,PCB 2508 may have somewhat different electrical and mechanical systems,as described later in FIG. 27, as well as a slightly different firmwarediscussed in FIG. 28. The PCB 2508 may also be programmed to perform thelocalization algorithms described in connection with other embodimentsof the device, or to additionally or alternately perform otheralgorithms discussed in relation with FIGS. 29-33. The PCB 2508 may alsohave an axial sensing sub-unit (e.g., axial sensing sub-unit 42 of FIG.1A), and it may feature a radial sensor array that utilizes radialilluminators and radial detectors (e.g., the illuminators 1906 a and1906 b, and the detector 1904 of FIG. 19) to localize the device similarto other ingestible devices (e.g., the ingestible devices 10, 300, 302,304, 306, and 1900 of FIGS. 1A-1B, 3A-6B and 19). To accommodate theother sampling components in the ingestible device 2500, in someembodiments the PCB 2508 may only extend in one direction, and fit intothe first wall portion 14 a.

FIG. 26 shows an exploded view of the ingestible device 2500. A magneticring 2600 is connected to the second wall portion 5212, and rotatesalong with the second wall portion 5212. In some embodiments, themagnetic ring 2600 may be affixed to second wall portion 2512 usingcyanoacrylate, or any other suitable bonding material or adhesive. Insome embodiments the interior of the magnetic ring 2600 may interlockwith the gear-motor 704, causing the magnetic ring 2600, the second wallportion 2512 and the second end portion 2514 to rotate as the gear-motor704 rotates. In some embodiments, the second wall portion 2512 or thesecond end portion 2514 will connect directly to the gear-motor. Forexample, the gear-motor may interlock with the second end portion 2514at the small opening 2516. To aid in the operation of the device, thePCB 2508 may feature an additional magnetic sensor 2602, which maydetermine the orientation of the magnetic ring 2600. For example, themagnetic ring 2600 may contain a series of magnets, positioned such thatthe magnets are closest to the magnetic sensor 2602 when the opening2518 is aligned with a chamber 706. The PCB 2508 may then use a detectedsignal from the magnetic sensor 2602 as part of a feedback loop toadjust the position of the opening 2518 by controlling the gear-motor704. In general, the PCB 2508 may include a gear-motor controller, andthe PCB 2508 may transmit an electrical DC or AC signal to move thegear-motor 704. The locking end 2606 of the second wall portion 2512 isconfigured to work with the connecting portion 2 step 510. It isdesigned to allow the second wall portion 2512 to rotate freely relativeto the first wall portion 2502, while also remaining connected to thefirst wall portion 2502.

The storage sub-unit 2604 is similar to the storage sub-unit 702 (FIG.14A), and is enclosed by the second wall portion 2512. The storagesub-unit 2604 includes chambers, such as the chamber 706. Each chamber706 on the storage sub-unit 2604 is accessible when the respectivechamber opening 708 is aligned with the opening 2518 in the second wallportion 2512. As the second wall portion 2512 moves, chambers may eitherbecome accessible to environment around the ingestible device 2500, orthey may become inaccessible to the environment around the ingestibledevice 2500. Each chamber 706 may also incorporate a hydrophilic foam orsponge to assist in acquiring samples. Additionally, this hydrophilicfoam or sponge may be provided with or without biological agents forfixation or detection of a target analyte, effectively modifying chamber706 into a sampling and diagnostics chamber. This may be combined withother diagnostic and assay techniques to diagnose or detect differentconditions that may affect specific portions of the gastrointestinaltract.

As depicted in connection with the ingestible device 2500, the storagesub-unit 2604 contains two chambers (e.g., copies of chamber 706) spreadaround approximately two thirds of the circumference of the storagesub-unit 2604. The final portion of the storage sub-unit 2604 is a nullchamber 2608 forming a protrusion that blocks the opening 2518. In someaspects, the null chamber 2608 may be fabricated out of silicone, and infurther aspects it may be fabricated out of silicone with a Shore Adurometer of approximately 45. In some embodiments the final portion ofthe storage sun-unit 2604 may contain a third chamber that is eitherunused, or permitted to be in constant contact with the environmentaround the ingestible device 2500. In some embodiments, the firstchamber may be used to sample the gastrointestinal tract, and the secondchamber may be used to resample the gastrointestinal tract, by obtaininga second sample. For example, in some embodiments the ingestible device2500 may resample the gastrointestinal tract by taking a second sample afixed period of time after the first sample. In some embodiments, theingestible device 2500 may resample the gastrointestinal tract at asecond location different from the first location. For example, theingestible device 2500 may be programmed with two differentpredetermined locations to be sampled, the duodenum and the jejunum. Inthis case, when the ingestible device 2500 determines that it is locatedin the duodenum, it may take the first sample, and when the ingestibledevice 2500 determines it is located in the jejunum, it may take thesecond sample. In some embodiments, after taking each of the samples,the ingestible device prevent the samples from leaving the chambers(e.g., the copies of chamber 706) by moving the second wall portion 2512to a position where the opening 2518 is aligned with the null chamber2608.

In some embodiments, the storage sub-unit 2604 remains stationary as thesecond wall portion 2512 rotates, but in some embodiments the storagesub-unit 2604 may be rotated as the second wall portion 2512 isstationary. In some embodiments the opening 2518 may be covered by asliding door, which can move to the side revealing the opening 2518.When used in conjunction with a rotating storage sub-unit 2604, this maybe particularly effective for maximizing the usable space inside thestorage sub-unit. In some embodiments the storage sub-unit may also beadapted to include sample diagnostics, such as an assay. The storagesub-unit may alternately sequester new samples, perform diagnostics onthe samples, and release the samples back into the gastrointestinaltract. In some embodiments the back wall of the chamber 706 may comprisean electro-mechanical actuator to push samples out of the chamber. Insome embodiments a similar electromechanical actuator may be used topull samples or fluid into the chamber by suction. In some embodimentsthe ingestible device 2500 may also sequester a sample in a chamber 706once it reaches a particular location by reconfiguring the second wallportion 2512 relative to the storage sub-unit 2604, test the sampleusing a diagnostic such as an assay, and based on the result of thediagnostic reconfigure the second wall portion 2512 relative to thestorage sub-unit 2604 to release a medicament stored in a different oneof the chambers 706.

FIG. 27 illustrates various electrical sub-units corresponding to someembodiments of the device. In particular, FIG. 27 illustrates electricalsub-units that may be implemented in the PCB 2508 in connection with theingestible device 2500, but any of the systems, devices, and methodsdiscussed in relation to FIG. 27 may be combined with any other system,device, or method in this application. For example, the systems,devices, and methods illustrated in FIGS. 2A-2E and 15 may supplement orbe done in alternate with the systems, devices, and methods in FIG. 27,and vice-versa. In some embodiments, the PCB 2508 is a flex PCB withrigid strengtheners, powered by three Silver Oxide 370 batteries. Theelectrical system of PCB 2508 is controlled by microcontroller 2700,which in some embodiments may be similar to microcontroller 110 (FIG.2A). In some embodiments of the ingestible device 2500, themicrocontroller 2700 is the STM32L051k8, which has a low power ARMCoretex core. Microcontroller 2700 features a memory sub-unit 2702,which may include both flash storage 2704 and EEPROM storage 2706 forstoring both instructions, and for storing data acquired from thevarious sensors.

The electrical system includes a top axial sensing sub-unit 2708, aradial sensing sub-unit 2710, and in some embodiments may include anadditional bottom axial sensing sub-unit 2712, all of which may besimilar to the sensing sub-units discussed in relation to FIGS. 2A and15, and in some embodiments each sub-unit may comprise an LED/PhotoSensor pair. The microcontroller 2700 may communicate with these sensingsub-units using a general input output interface (e.g., General I/O 112)in combination with an analog-to-digital converter (e.g.,analog-to-digital converter 116) for converting and quantifying signalsdetected by the photo-sensors included in the sensing sub-units 2708,2710, 2712. The electrical system may also include an IR opticalreceiver/transmitter 2714, which may be used to assist in localization,or may be used to transmit and receive signals. For example, this may beused in conjunction with the communication sub-unit 120 and opticalencoder 20 (FIG. 2A) to communicate with a base station and allow theingestible device 2500 to be programmed. In some embodiments, the PCB2508 may also include an RF transceiver for use in communications (e.g.,RF transceiver 722). The IR optical receiver transmitter 2714 cancommunicate with microcontroller 2700 using General I/O 112 or a UART(e.g., Universal Asynchronous Receiver/Transmitter (UART) interface 114(FIG. 2A).

In some embodiments, the PCB 2508 includes a real time clock (RTC)oscillator 2716 operating at 32.768 kHz. This clock communicatesdirectly with microcontroller 2700, and may be used to quantify capsuletransit times with real-time accuracy, or it may be used to track timeas the ingestible device goes into a temporary sleep state and wakesitself up at periodic intervals. The power supply for themicrocontroller 2700 features a power regulator 2718, controlling andfiltering the voltage delivered by the batteries 18, as well as abrown-out protection circuit 2720 that prevents or substantiallyprevents small variations in voltage from disrupting a device function.For example, in some aspects the brown-out protection circuit maymitigate a possible voltage drop as batteries 18 are used to move amotor 2722. The motor 2722 may be substantially similar to gear-motor704, but the circuitry may be easily adapted to move other types ofmotors or actuators. In some embodiments, the brown-out protectioncircuit 2720 may include a Schottky diode connected between thebatteries 18 and the microcontroller 2700, and may additionally includea bulk capacitance on the side of the Schottky diode with themicrocontroller 2700. In some embodiments, a voltage drop in batteries18 due to moving motor 2722 may cause the Schottky diode to electricallyisolate microcontroller 2700 from the batteries 18, while allowingmicrocontroller 2700 to maintain operation by drawing stored energy fromthe bulk capacitance. In some embodiments, the microcontroller 2700 mayalso suspend some device functionality while the motor 2722 moves. Forexample, while the motor 2722 moves, the microcontroller 2700 maysuspend use of the sensing sub-units 2708, 2710 and 2712, and draw lessenergy from the bulk capacitance. In some aspects this brown-outprotection circuit may allow the ingestible device 2500 to operate botha motor 2722 and microcontroller 2700 using the same batteries 18. Insome embodiments the brown-out protection circuit may also include avoltage sensor for sensing the voltage level of batteries 18, and/or thebulk capacitance, and the ingestible device 2500 may not move the motor2722 unless one or both of the sensed voltage levels are above athreshold value. For example, the ingestible device 2500 will preventthe motor 2722 from moving unless the voltage on the bulk capacitors issufficient to maintain operation of the microcontroller 2700 for theduration of the motor movement.

In some embodiments, the PCB 2508 also has a motor position sensor 2724,and a motor direction control 2726 that communicate with microcontroller2700 by GPIO, which are used in combination to manipulate the motor 2722(e.g., gear-motor 704). The motor direction control 2726 is a motordirection H-bridge, which can alternate whether a DC-motor (e.g., themotors 2722, 704) rotates clockwise or counter-clockwise. This may beused in combination with a motor-driver (e.g., the motor driver 742(FIG. 15)) or a motor control sub-unit (e.g., the motor control sub-unit740 (FIG. 15)). This ensures that opening 2518 can align with aparticular chamber opening 708 without disrupting other chambers.

In some embodiments, the motor position sensor 2724 is a magneticsensor, such as a hall effect sensor, that can detect the orientation ofmagnetic ring 2600, which is connected to the second wall portion 2512containing the opening 2518. The combination of the motor positionsensor 2724, the microcontroller 2700, and the motor direction control2726, can act as a simple feedback circuit to ensure that motor 2722 isoriented correctly. In some embodiments, the PCB 2508 may also includeother sensors, such as temperature sensors, and may be adapted toinclude optical, electrical or chemical diagnostics for studying samplesacquired in chamber 706. In some embodiments the microcontroller 2700may also be adapted to sense the location of the chambers (e.g., chamber706). For example, by using the magnetic sensing sub-unit 2602 incombinations with magnets embedded into the walls of the chambers.

The microcontroller 2700 actuates and monitors the various sensors andsensing sub-units 2708, 2710, 2712 to locate itself within thegastrointestinal tract. For example, microcontroller 2700 may operatethe axial and radial sensing sub-units 2708 and 2701, to flash differentcolors of light, and to detect the resulting reflectance using thephoto-sensors in the sensing sub-units. Similarly, in some embodiments,the microcontroller 2700 may obtain temperature data from a temperaturesensor as well. These detected data values are stored as logs (e.g., inEEPROM storage 2706 of memory sub-unit 2702), which may be retrievedlater on for either post-analysis, or to perform one of the localizationalgorithms described in this application.

FIG. 28 illustrates the firmware corresponding to some embodiments ofthe device. Specifically, FIG. 28 describes the firmware 2800 andsoftware systems that may be used in some embodiments to control theoperation of the PCB 2508 and the ingestible device 2500. The firmware2800 is installed into the internal non-volatile flash memory 2704 ofthe microcontroller 2700 at the time of manufacture, or duringauthorized service periods, and generally may not be altered orreprogrammed after it is installed on the ingestible device 2500. Insome aspects, this may be done by having the programming leads (i.e.,the physical connections to write or re-write to flash storage 2704) becontained within the housing of the ingestible device 2500, or havingprogramming leads printed onto a portion of the flexible circuit boardused to construct PCB 2508 which is physically cut off after thefirmware 2800 has been installed.

The firmware 2800 controls various functions of the device, asillustrated in FIG. 28. Notably, firmware 2800 is encoded withinstructions that may control the function of microcontroller 2700, andby proxy, the systems described in FIG. 27. Real time clock (RTC) andpower cycle control 2802 determines how microcontroller 2700communicates and interacts with RTC Oscillator 2716. In someembodiments, the ingestible device 2500 is set to sleep most of thetime, disabling various device functions to preserve energy. Theingestible device 2500 is set to wake-up at pre-defined times, collectsensor data, periodically analyze collected data, perform actions asappropriate (sample, identify GI features) and return to sleep.Maintaining a large percentage of time in sleep mode may conserveonboard power reserves. The power cycle control 2802 allows theingestible device 2500 to wake-up at appropriate intervals. Twoexemplary methods for controlling the operation of the device based onthese sleeping and waking intervals are illustrated later on inconjunction with FIGS. 29 and 30. Motor position and magnetic sensingcontrol 2804 contains instructions for allowing microcontroller 2700 tointeract with motor position sensor 2724. In some embodiments, the motorposition sensor 2724 is replaced by other types of magnetic sensingunits (e.g., magnetic sensing unit 2602) which can be used to determinethe location and orientation of various portions of the ingestibledevice. Motor control 2806 contains instructions for allowingmicrocontroller 2700 to operate motor direction control 2726 via GPIO,and control the motion of motor 2722. In some embodiments, motor 2722may be one and the same as gear-motor 704, although in some embodimentsother types of motors may be used.

The internal EEPROM storage control 2808 contains drivers for allowingthe microcontroller 2700 to interact with EEPROM storage 2706. Internalflash storage control 2810 contains similar drivers for allowing themicrocontroller 2700 to interact with the flash storage 2704. Thereflectance sensor control 2812 contains instructions for themicrocontroller 2700 to obtain and quantify light detected by photosensors (e.g., the photo-sensing half of the sensing sub-units 2708,2710, and 2712, or detector 1904). In some embodiments, any reflectance(i.e., light reflected onto a detector) will cause a detector togenerate a voltage or current directly proportional to the amount oflight detected. This is passed into an ADC, and the resulting digitalsignal can be used by the microcontroller 2700 to quantify the amount oflight that was received in the reflectance. The reflectance sensor LEDcontrol 2814 contains instructions for the microcontroller 2700 tooperate the various illuminators of the ingestible device 2500 (e.g.,the LED half of the sensing sub-units 2708, 2710, 2712, or theilluminators 1902 a and 1902 b). By using a GPIO, the microcontroller1700 may control when an LED produces light, or in the case of anRGB-LED package, to control the color of light being produced (i.e.,select different wavelengths for the illumination). The serialcommunications control 2816 contains instructions for operating IRoptical receiver/transmitter 2714 to communicate signals to and from thedevice using a Universal Asynchronous Receiver/Transmitter (UART). Forexample, the microcontroller 2700 may encode a digital pulse train ontothe IR transmitter (e.g., using optical encoder 20) to communicate witha base station (e.g., base station 950). Similarly, the IR receiver maybe used to receive signals from the base station, allowing a doctor toset device parameters or reprogram select features of the ingestibledevice 2500.

Although the firmware 2800 is primarily discussed in connection with theelectrical subsystem described by FIG. 27, similar firmware can be usedto control other electrical systems in an ingestible device (e.g., thesystem described by FIGS. 2A-2E and FIG. 15). As mentioned above inconnection with the RTC and power cycle control 2802, the firmware maycontain instructions to preserve device power by setting the ingestibledevice 2500 to spend a significant portion of time in a sleep mode, andtake samples and perform the full range of device functions at periodicintervals. In these embodiments, the firmware 2800 has two primaryexecution paths, a slow main program loop, and a fast timer based loop.The slow main program loop is illustrated FIGS. 30A-30B, and it may runa list of predefined tasks. Each task in the slow main program loop maybe performed at a fixed rate, and respond to non-deterministic externalevents, such as new data acquired from the optical sensors (e.g., fromthe sensing sub-units 2708, 2710, 2712). In contrast, the fast timerbased loop will periodically interrupt the slow main program loop, andlook after processes that need a high speed processing at frequentintervals.

FIG. 29 is a flowchart that describes some embodiments and processes forwaking-up an ingestible device from a sleep or standby state, andoperating an ingestible device. In some aspects, the wake-up process2975 controls the operation of the device, and sets intervals tointerrupt a sleeping or stand-by state of the ingestible device 2500,causing it to wake-up and perform the slow-loop process illustrated inFIGS. 30A-30B, as well as the fast loop process 2950. The fast loopprocess 2950 may periodically interrupt the slow-loop process, and lookafter processes that need a high speed processing at frequent intervals.For example, after the ingestible device 2500 wakes-up, the slow-loopprocess may track which task needs to be done next (e.g., collect dataor run the localization algorithm), while the fast loop process 2950 maymonitor for external communications (e.g., communications from basestation 950 (FIGS. 17A-17C)) and operate the sensors.

At step 2900 of the fast loop process 2950, the ingestible device 2500the fast loop process 2950 interrupts the slow loop process. In order toperform high speed processing, the fast loop process 2950 may interruptand take control the ingestible device 2500 with a frequency greaterthan 6 kHz.

At step 2902, the ingestible device 2500 checks for externalcommunications. For example, the ingestible device 2500 may check ifthere is a signal being received by IR optical receiver 2714 from a basestation 950. In some embodiments, the ingestible device 2500 may also beequipped with other types of wireless communication means, such asBluetooth, near field communications, RF transceivers, and the like. Inthese cases, the ingestible device 2500 may monitor for any type ofcommunication at step 2902. In some embodiments, if a communication isdetected, the ingestible device 2500 may continue to monitor thecommunication until the communication finishes.

At step 2904, the ingestible device 2500 checks if one millisecond haspassed since the last time the time counter at step 2906 wasincremented. In some aspects, this may allow the ingestible device 2500to check for communications at step 2902 at a high frequency, andperform other operations (e.g., servicing sensors at steps 2910, 2912,2914 and 2916) at a lower frequency. In some embodiments, the ingestibledevice 2500 may count out one millisecond intervals by decrementing acounter at step 2904, and resetting the counter at step 2906. Forexample, if process 2950 repeats with a frequency of 6 kHz, the counterwill be initially set to “six,” and the fast loop process 2950 willrepeat 6 times before the ingestible device proceeds to step 2906,resulting in the ingestible device 2500 proceeding to step 2906 in onemillisecond intervals. If one millisecond has passed since the last timethe time counter at step 2906 was incremented the ingestible device 2500proceeds to step 2906, otherwise the ingestible device 2500 proceeds tostep 2918.

At step 2906, the ingestible device 2500 will increment time counter,tracking the number of milliseconds since the device was woken-up. Insome aspects, the time counter may be used by the ingestible device todetermine how long particular steps of the slow loop process have beenproceeding for. For example, in some embodiment the slow loop processmay indicate when the ingestible device 2500 moves a motor (e.g., themotors 2720 or 704) to open the chamber 706 and acquire a sample, andthe time counter may be used by the slow loop process to determine howlong the chamber 706 has been open.

At step 2908, the ingestible device 2500 selects a sensor to sample. Insome embodiments, the ingestible device 2500 will sample the sensors inorder, selecting a sensor to sample every millisecond. For example, theingestible device 2500 may proceed to step 2910 during the firstiteration, step 2912 during the second iteration, step 2914 during thethird iteration, and step 2916 during the fourth iteration, and thenrepeat the sequence after all the sensors have been sampled. In someembodiments certain sensors may be sampled more or less often thanothers. For example, the temperature sensor may be ignored while theingestible device is inside the small intestine, and the ingestibledevice 2500 may not proceed to step 2912 at all. In some embodiments,the ingestible device 2500 will communicate data with a sensor while itis being sampled, but the sensor will continue to operate while it isnot being sampled. For example, every time the ingestible device 2500samples a radial sensing sub-unit, it may determine if a particularradial LED should be turned on, or turned off, or left in its currentstate, and the radial LED will persist in its current state while notbeing sensed. In some embodiment of the ingestible device 2500, theselecting a sensor to sample may additionally comprise the use of amultiplexor.

At step 2910, the ingestible device 2500 uses voltage sensors todiagnose possible malfunctions within the electrical system (e.g., theelectrical system described by FIG. 27). For example, the ingestibledevice 2500 may test communications to the various sub-units (e.g.,motor 2722) using the GPIO, and the ingestible device may determine thecurrent voltage being supplied by batteries 18. In some embodiments, theingestible device 2500 may only operate a motor (e.g., the motors 704 or2722) while the sensed voltage of the batteries 18 is above a thresholdvalue.

At step 2912, the ingestible device 2500 uses a temperature sensor togather a temperature measurement. For example, the ingestible device2500 may gather a temperature measurement to determine entry or exitfrom the body. In some embodiments, temperature measurements can also beused to estimate other locations within the gastrointestinal tract. Forexample, in some embodiments the ingestible device 2500 may determinethat sudden changes in temperature (e.g., as a result of a patientingesting a hot meal or a cold drink) indicate the ingestible device maybe located in the stomach.

At step 2914, the ingestible device 2500 uses radial sensors (e.g.,radial sensing sub-unit 32 and 2710) to gather radial reflectance data.For example, the ingestible device 2500 may use microcontroller 2700 toinstruct radial sensing sub-unit 2710 to flash a particular wavelengthof light, and measure the resulting reflectance. This can be done togather radial reflectance data (e.g., for the radial reflectance dataseries 602 (FIGS. 13A-13B), or the detected red green or bluereflectances 2426, 2428 and 2430 (FIG. 24)). Additionally, in someembodiments the ingestible device 2500 may test the radial sensingsub-units to detect device malfunctions. For example, if a first radialilluminator is not producing a resulting signal in any of the radialdetectors, but the other radial illuminators are, then the ingestibledevice 2500 may determine that first radial illuminator is notfunctioning properly.

At step 2916, in some embodiments the ingestible device 2500 uses axialsensors (e.g., the axial sensing sub-unit 42, 2708, and 2712) to gatheraxial reflectance data. This can be done to gather axial reflectancedata (e.g., for the axial reflectance data series 604 (FIGS. 13A-13B),or the detected infrared reflectance 2432 (FIG. 24)). Additionally, insome embodiments the ingestible device 2500 may use these data to detectanomalies within the gastrointestinal device, or possible devicemalfunctions. For example, if the ingestible device 2500 measures anumber of abnormal data points as a result of a medical anomaly, theingestible device 2500 may use the fast loop process 2950 to gather moredata points near the anomaly.

At step 2918, the ingestible device 2500 terminates the fast loopprocess 2950 and returns to a sleeping state. However, in someembodiments the fast loop process 2950 may begin again almostimmediately again thereafter.

RTC wake-up process 2975 is distinct from fast loop method step 2900,and in some aspects it may control operation of the device based on thepower saving settings (e.g., as part of RTC and power cycle control 2802(FIG. 28)). When the ingestible device 2500 temporarily enters a sleepstate, RTC oscillator 2716 continues to run and track the passage oftime. The microcontroller 2700 is configured to wake-up the ingestibledevice 2500 at regular intervals based on the RTC oscillator 2716output, and perform the primary sampling and data gathering functions ofthe device.

At step 2920, the ingestible device 2500 receives a signal from the RTCoscillator 2716 to wake-up. In some aspects, this may occur at aninterval between one second and 10 minutes, and in further aspects, theinterval may depend on the current location of the ingestible device,and the ingestible device settings and power reserves. For example,while in the stomach (e.g., in the start 2402 or stomach 2404 (FIG.24)), the ingestible device 2500 may be woken-up and take data samplesevery one second. In the small intestine (e.g., in the duodenum 2406 andthe jejunum 2408 (FIG. 24)), there is less variability in theenvironment around the ingestible device 2500, and the device may bewoken up and take data samples every 30 seconds instead.

At step 2922, the ingestible device 2500 wakes up, and begins to performthe fast/slow loop operation of the device, which is described inconnection with FIGS. 30A-30B and process 2950.

At step 2924, the ingestible device 2500 has finished gathering a newdata set and performing the localization algorithm, and it returns to asleeping or standby state. Depending on the device settings, theingestible device 2500 may configure the RTC oscillator to wake-up thedevice again after a predetermined period of time.

It is contemplated that the steps or descriptions of FIG. 29 may be usedwith any other embodiment of this application. In addition, the stepsand descriptions described in relation to FIG. 29 may be done inalternative orders or in parallel to further the purposes of thisapplication. For example, performing the steps described by step 2910,step 2912, step 2914 and step 2916 in parallel may reduce latency, orallow the gathered data points to be synchronized to a particular time.Furthermore, it should be noted that any of the ingestible devices orsystems discussed in this application could be used to perform one ormore of the steps in FIG. 29.

FIGS. 30A-30B are a flowchart that illustrates various aspects of theslow loop operation of an ingestible device, in accordance with someembodiments of the device. An ingestible device (e.g., the ingestibledevice 2500) may spend most of the time in a sleeping or standby statein order to preserve energy reserves. In some aspects, every time theingestible device 2500 is woken up, the fast loop process 2950 and theslow loop process 3050 will run in order to gather data, runlocalization algorithms to determine the location of the device, andtake samples if necessary.

The slow loop process 3050 begins at step 3000. At step 3000, theingestible device 2500 is woken up by a real time clock (e.g., at step2922 of wake-up process 2975), a magnet (e.g., from activating themagnetic switch 162 (FIG. 2A)), or by a watchdog algorithm. In someaspects, a watchdog algorithm will safeguard against an error that haltsexecution of a program. In some embodiments the watchdog algorithm willcomprise an independent hardware timer that will periodically checkvarious device functions, sensors, and/or hardware/software systems, andonly allow the ingestible device 2500 to operate if all of the checkedfunctions and/or systems are operating correctly. For example, if theingestible device 2500 is unable to establish a connection with asensor, it may reset itself by setting an RTC alarm and entering a sleepor stand-by state.

At step 3002, a system state is read from memory. For example, a currentstate of the ingestible device 2500 may be stored in flash storage 2704.The state may indicate a current location of the ingestible device 2500within the gastrointestinal tract. The state may also indicate if theingestible device 2500 has been programmed and initialized properly Forexample, the state may indicate whether a doctor or technician properlyset up the ingestible device 2500 prior to administering the ingestibledevice 2500 to a patient.

At step 3004, the ingestible device 2500 determines if it has beenproperly programmed. If the ingestible device 2500 has been programmed,the process may proceed to step 3006, if the ingestible device 2500 hasnot been programmed, the process may proceed instead to step 3030.

At step 3006, the ingestible device 2500 determines if it has beenwoken-up by a real time clock (e.g., at step 2922 of wake-up process2975). If the ingestible device 2500 has been woken up by a real timeclock, the process may proceed to step 3008, and otherwise proceed tostep 3024.

At step 3008 the ingestible device 2500 gathers data from the varioussensors on the device (e.g., from the axial and radial sensing sub-units2708, 2710 and 2712 (FIG. 27)). The sensing pattern and data acquisitionpattern can differ based on the intended use of the ingestible device2500, but in some embodiments the ingestible device will gather a red,green, blue, and infrared reflectance data sample, as well as atemperature measurement.

At step 3010, the ingestible device 2500 logs the sensor data gatheredat step 3008 to internal memory (e.g., to the memory sub-unit 2702 (FIG.27)). In the ingestible device 2500, data logs are recorded to 50 kB ofinternal flash memory (e.g., the flash storage 2704 (FIG. 27)) and maybe retrieved when requested by an external system, although a differentamount of memory may be available in some embodiments. In some aspects,a data log will include a capsule transit time, derived through eitheran algorithm or taken from RTC oscillator 2716, as well as a full set ofthe sensor data corresponding to red, green, blue, and infraredreflectances along with a temperature measurement.

At step 3012, the ingestible device 2500 runs a localization algorithm(e.g, as described by FIGS. 9-13 or FIG. 24) to determine the locationof the device. In some aspects, the ingestible device 2500 does this byanalyzing either the sensor data acquired at step 3008, or using a dataset of previous and current sensor data stored in flash memory (e.g.,the flash storage 2704). For example, the ingestible device may use aduodenum detection algorithm to determine a pyloric transition (e.g.,pyloric transition 2416 (FIG. 24)) from a stomach (e.g., stomach 2404(FIG. 24)) into a duodenum (e.g., duodenum 2406 (FIG. 24)).

At step 3014, the ingestible device 2500 determines if a physical samplewill be gathered. For example, the ingestible device 2500 may beprogrammed to gather a sample as soon as a particular region of thegastrointestinal tract is identified at step 3012. The ingestible device2500 may also be programmed to gather a sample a certain amount of timeafter a particular region of the gastrointestinal tract is identified atstep 3012. For example, the ingestible device 2500 may be programmed togather a sample as soon as the jejunum is detected, or gather a sample10 minutes after the duodenum is detected. If the ingestible device 2500is to gather a sample, the ingestible device 2500 may proceed to step3016, and otherwise it may proceed to step 3018.

At step 3016, the ingestible device 2500 uses a motor movement algorithmto gather a physical sample. This may be done by causing the device tochange from one configuration that does not allow material into a samplechamber, to a second configuration that allows material into the samplechamber. For example, the ingestible device 2500 may use microcontroller2700 to transmit a signal to motor 2722 to move the second wall portion2512, and align opening 2518 with a chamber opening 708. After apredetermined period of time, such as 10 minutes, the ingestible device2500 may also cause the motor 2722 to rotate the opening 2518 away fromthe chamber opening 708, sealing off the chamber 706 with the sampleinside.

At step 3018, the ingestible device 2500 may determine if the maximumnumber of sensor logs have been reached. In some embodiments, theingestible device 2500 will have 50 kB of flash memory available forstoring sensor data. In some embodiments, this is sufficient forrecording about 5000-10000 samples, depending on the number of sensors,the data format, and the precision used. In some embodiments theingestible device 2500 may also remove data samples, or store the datasamples in compressed format. For example, the ingestible device 2500may remove every other data sample after it is no longer needed forlocalization, leaving enough resolution for a physician or doctor tointerpret the data afterwards. For data that is largely redundant orlinear (e.g., temperature data taken within the body), the ingestibledevice 2500 may approximate portions of the data set as a linearfunction, storing the start and end points, and reducing the totalamount of memory needed. If a maximum number of logs has been reached,the ingestible device 2500 may proceed to step 3022, otherwise theingestible device 2500 may proceed to step 3020.

At step 3020, the ingestible device 2500 sets a real time clock wake-upalarm. In some embodiments, the ingestible device 2500 may be configuredto set an alarm to wake-up the device and gather a new set of data at alater time. In some aspects, the interval between sleeping and waking-upis between one second and 10 minutes. When the alarm goes off (e.g., atstep 2920 of process 2975), the ingestible device 2500 is interruptedfrom a sleep or standby state, and process 3050 will repeat.

At step 3022, the ingestible device 2500 will enter a deep sleep orstandby state. In some embodiments, if no RTC wakeup alarm is set, theingestible device 2500 will go into a deep sleep by default, and suspendsome device functions. In some embodiments , the ingestible device 2500shuts off some device functions in a standby state, but will continue tomonitor a real time clock (e.g., RTC oscillator 2716 (FIG. 27)) todetermine when the ingestible device 2500 is to resume operation.

At step 3024, the ingestible device 2500 will enable communications. Insome embodiments, the ingestible device 2500 may deactivatecommunications to preserve energy reserves and avoid depleting battery18. However, in some embodiments the ingestible device 2500 will checkfor external communications (e.g., from the base station 950 via IRoptical receiver 2714) if it is woken by something other than the RTCalarm. This may be done by powering and operating the IR opticalreceiver 2714 or communication sub-unit 120. In some embodiments, theingestible device 2500 may use other types of communication, such asradio frequency (RF), Bluetooth, or other near field communications(NFC) that can be turned on and off on-demand.

At step 3026, the ingestible device 2500 checks for externalcommunications. For example, after ingestible device 2500 activatescommunications (e.g., communication sub-unit 120), the ingestible device2500 may monitor IR optical receiver 2714 for communications from basestation 950 in some embodiments.

At step 3028, the ingestible device 2500 will wait for an incomingcommunication for 20 seconds. If no communication is detected for 20seconds, the ingestible device 2500 will turn off communications topreserve energy. In some embodiments the ingestible device 2500 may waitfor a different period of time, or it may reset the 20 second timerwhenever incoming communications are received.

At step 3030, the ingestible device 2500 will enable communications bydefault if the ingestible device 2500 has not been programmed. In someembodiments, the ingestible device 2500 needs to be programmed orinitialized by a doctor or technician before being administered to apatient. If no programming is found on the ingestible device 2500, itwill enable communications and wait for programming instructions bydefault.

At step 3032, the ingestible device 2500 will wait for programminginstructions from a user. In some embodiments, a user may be providedwith a computer, phone, tablet or watch application, a radiotransceiver, a base station, or the like, for communicating with theingestible device 2500. For example, a user may be provided with a basestation 950 capable of transmitting infrared signals to the ingestibledevice 2500, which will be detected and interpreted (e.g., signalsdetected by the IR optical receiver 2714 and interpreted by thecommunication sub-unit 120).

At step 3034, the ingestible device 2500 will wait for the sensoracquisition to complete. After the ingestible device 2500 begins toreceive incoming communication signals, the ingestible device 2500 willwait till the full communication has been received. For example, it maytake a few minutes for a user to program the ingestible device 2500, andthe ingestible device 2500 will keep the communications channel openwhile instructions are being received.

At step 3036, the ingestible device 2500 will check if communicationshave been received in the last 20 seconds. Similar to step 3028, theingestible device 2500 will turn off to preserve energy if nocommunication is detected for 20 seconds. In some embodiments theingestible device 2500 may wait for a different period of time.

It will be understood that the steps and descriptions of the flowchartsof this disclosure, including FIGS. 30A-30B, are merely illustrative.Any of the steps and descriptions of the flowcharts, including FIGS.30A-30B, may be modified, omitted, rearranged, performed in alternateorders or in parallel, two or more of the steps may be combined, or anyadditional steps may be added, without departing from the scope of thepresent disclosure. For example, the ingestible device 2500 may continueto acquire new data samples and run the localization algorithm at thesame time that a sample is being acquired. Furthermore, it should benoted that the steps and descriptions of FIGS. 30A-30B may be combinedwith any other system, device, or method described in this applications,and any of the ingestible devices or systems discussed in thisapplication could be used to perform one or more of the steps in FIGS.30A-30B.

FIG. 31 is a flowchart that illustrates the general operation of thedevice, in accordance with some embodiments of the device. In someaspects, sample operation process 3150 describes using an ingestibledevice to procure a sample from the gastrointestinal tract of a patient.Although FIG. 31 may be described in connection with the ingestibledevice 2500 for illustrative purposes, this is not intended to belimiting, and either portions or the entirety of the process describedin FIG. 31 may be applied to any device discussed in this application(e.g., the ingestible devices 10, 300, 302, 304, 306, 700, and 1900),and any of the ingestible devices may be used to perform one or moreparts of the process described in FIG. 31. Furthermore, the features ofFIG. 31 may be combined with any other systems, methods or processesdescribed in this application. For example, the process described byFIG. 31 may utilize the hardware and electrical systems in FIGS. 2, 15,27 and 28, or the localization methods in FIG. 8-13, 21-24 or 32-33.

At step 3100, the ingestible device 2500 will detect if it has beenactivated by being detached from a magnet. As described in FIG. 2A, aningestible device (e.g., the ingestible device 2500) may have a magneticswitch 162 for turning on or off the device. After being manufactured,the ingestible device may be placed in a specialized container near amagnet, and the resulting magnetic field that keeps the magnetic switch162 in the “Off' position. When the ingestible device 2500 is ready tobe programmed by a user and administered to a patient, the ingestibledevice 2500 is moved away from the magnet, and the magnetic switch 162will change to the “On” position. Once the ingestible device 2500 isturned on for the first time, it may attempt to establishcommunications.

At step 3102, the ingestible device 2500 will wait for user input viaUART. The ingestible device is provided with a communications sub-unit(e.g., communication sub-unit 120), which may be used to communicatewith the ingestible device 2500 via UART (e.g., Universal AsynchronousReceiver/Transmitter (UART) interface 114). The ingestible device 2500will then provide an opportunity for a user to program the device. Insome embodiments, the ingestible device 2500 may be provided along witha base station or dock, which may be connected to a computer, tablet,hand-held device, smart phone or smart watch; for example, for a user toprogram the ingestible device 2500. In some embodiments, the ingestibledevice 2500 may also communicate using other means, such as radiofrequency, Bluetooth, near field communications, and the like, all ofwhich may be used to program the ingestible device 2500 or to retrieveinformation from the ingestible device 2500. In some aspects, theingestible device 2500 is administered to a patient after beingprogrammed and initialized by a user.

At step 3104, the ingestible device 2500 will perform sensing, log data,and perform a localization algorithm to determine the location of thedevice. After being administered to a patient, the ingestible device2500 will proceed to gather data from sensors, log data, and performlocalization algorithms to identify the location of the device based onthe gathered data. For example, the ingestible device 2500 may gather aset of axial and radial data as it transits through the gastrointestinaltract, and perform the localization algorithm described in connectionwith FIGS. 8-13. As another example, the ingestible device 2500 maygather sets of reflectance data from illumination at differentwavelengths, and perform the localization algorithm described inconnection with FIG. 24. In some aspects, the ingestible device 2500will attempt to identify a pyloric transition (e.g., pyloric transition2416 (FIG. 24)) as it enters the duodenum portion of the small intestine(e.g., duodenum 2406). Once the ingestible device 2500 determines thatit is located in the duodenum, the ingestible device may either take asample, or wait a predetermined period of time (e.g., 10 minutes) beforetaking a sample.

At step 3106, the ingestible device 2500 will gather a sample, andcontinue gathering and logging sensor data. After locating the duodenum,the ingestible device may take a sample from the gastrointestinal tractin the environment around the device, by providing access to a samplingchamber (e.g., chamber 706). For example, the ingestible device 2500 mayuse a motor (e.g., the motor 704, 2722) to change the device from oneconfiguration that does not allow samples from the gastrointestinaltract to enter the sampling chamber, to another configuration that doesallow samples from the gastrointestinal tract to enter the samplingchamber. This may be accomplished by transmitting a signal frommicrocontroller 2700 to motor 2722 to move the second wall portion 2512in such a way that opening 2518 is aligned with the chamber opening 708for the sampling chamber. Similarly, after waiting a certain period oftime, the ingestible device 2500 may move back the second wall portion2512 to seal off the sampling chamber after a sample has been procured.As the sample is being gathered, as well as afterwards, the ingestibledevice 2500 will continue to measure and log sensor data.

In some embodiments, the ingestible device 2500 will be configured torelease a medicament rather than gather a sample. For example, thechamber 706 may be provided with a drug, powder, liquid, or othermedicament prior to the ingestible device 2500 being administered to thepatient. In some embodiments a user may be provided with the ability toload a medicament into the chamber 706. For example, during the timethat the ingestible device 2500 is being programmed (e.g., by a userusing a base station 950) the user may be provided with the ability totransmit instructions to the ingestible device 2500 to expose thechamber 706 by rotating the second wall portion 2512.

In some embodiments, the ingestible device 2500 will be configured tostudy the captured sample using diagnostics. For example, each chamber706 may also incorporate a hydrophilic foam or sponge to assist inacquiring samples. Additionally, this hydrophilic foam or sponge may beprovided with or without biological agents for fixation or detection ofa target analyte, effectively modifying chamber 706 into a sampling anddiagnostics chamber. This may be combined with other diagnostic andassay techniques to diagnose or detect different conditions that mayeffect specific portions of the gastrointestinal tract.

At step 3108, the ingestible device 2500 will continue gathering andlogging sensor data, even after having obtained one or more samples. Insome aspects, the ingestible device 2500 will continue to log sensordata until a maximum number of data logs have been gathered.

At step 3110, the ingestible device 2500 will enter a deep sleep stateafter reaching maximum operation time, detecting an exit from the body,or logging a maximum number of data samples. In some aspects, theingestible device 2500 turns off some device functions in the deep sleepstate, until it is woken up. In some embodiments the ingestible device2500 may be woken up use of a magnet or base station provided to a user.In some embodiments, a patient may retrieve the ingestible device 2500after it has exited the body, and the gathered samples and data logs canbe collected from the retrieved device. In some embodiments, aningestible device may use wireless communication techniques in-vivo,such as RF, Bluetooth or near field communications, to transmit thegathered data to a computer, base station, tablet, phone, smart-watch,or other similar device.

At step 3112, the ingestible device 2500 may be woken-up via UART afterbeing retrieved by a user. In those embodiments where the device hasbeen retrieved by the user, a retrieved device may be brought back to abase station (e.g., the base station 950) or similarly equipped computerfor data and sample retrieval. In some embodiments, the ingestibledevice 2500 will also be woken up from its deep sleep by exposure to amagnet; for example, a magnet that may be provided as part of basestation 950.

At step 3114, the ingestible device 2500 will have completed itsoperation, and will provide a user with the ability to retrieve physicalsamples. After being retrieved and reactivated from the deep sleepstate, the ingestible device 2500 may automatically communicatecollected data back to the user, and it may provide access to chamber706. In some embodiments, a user or certified technician may be providedwith means for collecting the physical memory and samples directly fromthe ingestible device 2500. For example, by providing special tools fordisassembling the ingestible device 2500 to authorized individuals, anypotentially sensitive data or samples can be protected from beingaccessed by unauthorized users.

It will be understood that the steps and descriptions of the flowchartsof this disclosure, including FIG. 31, are merely illustrative. Any ofthe steps and descriptions of the flowcharts, including FIG. 31, may bemodified, omitted, rearranged, performed in alternate orders or inparallel, two or more of the steps may be combined, or any additionalsteps may be added, without departing from the scope of the presentdisclosure. For example, the ingestible device 2500 may enter a deepsleep state immediately after collecting a sample, in order to preserveenergy. Furthermore, it should be noted that the steps and descriptionsof FIG. 31 may be combined with any other system, device, or methoddescribed in this applications, and any of the ingestible devices orsystems discussed in this application could be used to perform one ormore of the steps in FIG. 31.

FIG. 32 is a flowchart illustrating some aspects of a caecum detectionalgorithm used by the device. Although FIG. 32 may be described inconnection with the ingestible device 2500 for illustrative purposes,this is not intended to be limiting, and either portions or the entiretyof the caecum detection process 3250 described in FIG. 31 may be appliedto any device discussed in this application (e.g., the ingestibledevices 10, 300, 302, 304, 306, 700, and 1900), and any of theingestible devices may be used to perform one or more parts of theprocess described in FIG. 32. Furthermore, the features of FIG. 32 maybe combined with any other systems, methods or processes described inthis application. For example, portions of the algorithm described bythe process in FIG. 32 may be integrated into any of the algorithmdescribed by FIG. 24.

At step 3200 the ingestible device 2500 wakes up. This may be done dueto a previously set RTC alarm set by the ingestible device 2500.

At step 3202, the ingestible device 2500 gathers and stores new sensordata points. The ingestible device 2500 starts by flashing differentcolored LEDs (e.g., the illuminators 1902 a and 1902 b) to produceillumination at red and green wavelengths, and detecting (e.g, bydetector 1904) the resulting reflectance coming from the environmentaround the ingestible device 2500. These data points are then stored inflash memory.

At step 3204, the ingestible device 2500 determines if a duodenum hasalready been detected. For example, if the current state of theingestible device 2500 is the DUODENUM or JEJUNUM state, or if aduodenum detection algorithm has already determined that a pylorictransition (e.g., pyloric transition 2416) has occurred.

At step 3206, the ingestible device 2500 loads the last “n” storedoptical sensor values from flash memory (e.g., the flash storage 2704).The number of points “n” should be sufficiently large to calculate astatistically significant average and standard deviation, but in manyaspects a value 30 is chosen.

At step 3208, the ingestible device 2500 calculates intra-set standarddeviations.

At step 3210, the ingestible device 2500 calculates intra-set meanvalues.

At step 3212, the ingestible device 2500 compares the red data to thegreen data. In some embodiments, this may involve subtracting a multipleof the red standard deviation from the mean of the red data, andsubtracting a multiple of the green standard deviation from the mean ofthe green data. In some embodiments, the multiple, “k”, is chosen to beapproximately 1.5. In some embodiments, the multiple may be programmedby a user prior to administering the device to a patient, or themultiple may be changed based on the measured sensor data. If thecondition in step 3212 is not satisfied, the ingestible device 2500considers that data point unreliable, and it is not considered.

At step 3214, the ingestible device 2500 increases the value of anintegrator. In some embodiments, the ingestible device 2500 adds thedifference between the mean of the green data and the mean of the reddata to the integrator. In some embodiments, the ingestible device 2500may normalize the difference by the mean of the green data before addingit to the integrator. In some embodiments, the integrator will beincremented by one, rather than adding the difference between the greendata and the red data. In some embodiments the integrator may also beperiodically reset to zero, or reduced by a certain percentage each timethe algorithm is performed. The ingestible device 2500 stores the valueof the integrator, and uses this value to determine when a transition tothe caecum has occurred.

At step 3216, the ingestible device 2500 compares the integrator to adetection threshold, to determine if a transition has occurred. In someembodiments the threshold value will be a multiple of the mean green orblue measurements, such as ten-times the mean green measurement. In someembodiments, when the integrator is incremented by one at the step 3214,or when the value added to the integrator at step 3214 has beennormalized, the threshold value may be a predetermined number. In someembodiments the predetermined number may be based on how frequentlysensor data is gathered, or it may be programmed into the device priorto being administered to a patient.

At step 3218, the ingestible device 2500 determines that a ileocaecaltransition has occurred, and that the device is now in the caecum. Thisis done after the algorithm determines that the integrated differencebetween the mean red reflectance data and the mean green reflectancedata is above a threshold value.

At step 3220, the ingestible device 2500 enters a deep sleep state.However, in some aspects the ingestible device 2500 may set an RTCoscillator alarm, which will wake the ingestible device 2500 from itssleep to take further data samples and perform additional localizationalgorithms if necessary.

It will be understood that the steps and descriptions of the flowchartsof this disclosure, including FIG. 32, are merely illustrative. Any ofthe steps and descriptions of the flowcharts, including FIG. 32, may bemodified, omitted, rearranged, performed in alternate orders or inparallel, two or more of the steps may be combined, or any additionalsteps may be added, without departing from the scope of the presentdisclosure. For example, the ingestible device 2500 may calculate themean and the standard deviation of multiple data sets in parallel inorder to speed up the overall computation time. Furthermore, it shouldbe noted that the steps and descriptions of FIG. 32 may be combined withany other system, device, or method described in this applications, andany of the ingestible devices or systems discussed in this applicationcould be used to perform one or more of the steps in FIG. 32.

FIG. 33 is a flowchart illustrating some aspects of a duodenum detectionalgorithm used by the device. Although FIG. 33 may be described inconnection with the ingestible device 2500 for illustrative purposes,this is not intended to be limiting, and either portions or the entiretyof the duodenum detection process 3350 described in FIG. 33 may beapplied to any device discussed in this application (e.g., theingestible devices 10, 300, 302, 304, 306, 700, and 1900), and any ofthe ingestible devices may be used to perform one or more parts of theprocess described in FIG. 33. Furthermore, the features of FIG. 33 maybe combined with any other systems, methods or processes described inthis application. For example, portions of the algorithm described bythe process in FIG. 33 may be integrated into the duodenum detectionalgorithm described by FIG. 24.

At step 3300, the ingestible device 2500 wakes up. The ingestible device2500 will normally wake up at regular intervals, based on an RTCoscillator. Once the ingestible device 2500 wakes up, it will proceedwith the rest of the process.

At step 3302, the ingestible device 2500 gathers and stores new sensordata points. The ingestible device 2500 starts by flashing differentcolored LEDs (e.g., the illuminators 1902 a and 1902 b) to produceillumination at red and green wavelengths. The ingestible device 2500then detects (e.g, by detector 1904) the resulting reflectance andstores the data in memory.

At step 3304, the ingestible device 2500 loads the last “n” storedoptical sensor values from flash memory (e.g., the flash storage 2704).The number of points “n” should be sufficiently large to calculate astatistically significant average and standard deviation, but in manyaspects a value above 30 is chosen.

At step 3306, the ingestible device 2500 calculates intra-set standarddeviations.

At step 3308, the ingestible device 2500 calculates intra-set meanvalues.

At step 3310, the ingestible device 2500 compares the red data to thegreen data. Similar to step 3212 (FIG. 32), in some embodiments this mayinvolve subtracting a multiple of the red standard deviation from themean of the red data, and subtracting a multiple of the green standarddeviation from the mean of the green data. If the condition in step 3310is not satisfied, the ingestible device 2500 may not consider that datapoint further.

At step 3312, the ingestible device 2500 increases the value of anintegrator. Similar to step 3214 (FIG. 32), in some embodiments theingestible device 2500 may add the difference between the mean of thegreen data and the mean of the red data to the integrator, and in someembodiments the integrator will be incremented by one, rather thanadding the difference between the green data and the red data. Theingestible device 2500 may then use the stored value in the integratorto determine when a transition to the duodenum has occurred.

At step 3314, the ingestible device 2500 compares the integrator to adetection threshold, to determine if a transition has occurred. Thethreshold value may depend on a number of factors, such as thosedescribed in relation to step 3216 (FIG. 32). Additionally, thethreshold may depend on the components used in the ingestible device2500, and may vary based on the size of the detected signals.

At step 3316, the ingestible device 2500 determines that a pylorictransition has occurred, and that it is currently located in theduodenum. This is done after the algorithm determines that theintegrated difference between the mean red reflectance data and the meangreen reflectance data is above a threshold value.

At step 3318, the ingestible device 2500 enters a deep sleep state.However, in some aspects the ingestible device 2500 may set an RTCoscillator alarm, which will wake the ingestible device 2500 from itssleep to take further data samples and perform additional localizationalgorithms if necessary.

At step 3320, the ingestible device 2500 will reset the integrator to 0.In some aspects, this is done when the ingestible device 2500 determinesthat recently collected data is unreliable.

It will be understood that the steps and descriptions of the flowchartsof this disclosure, including FIG. 33, are merely illustrative. Any ofthe steps and descriptions of the flowcharts, including FIG. 33, may bemodified, omitted, rearranged, performed in alternate orders or inparallel, two or more of the steps may be combined, or any additionalsteps may be added, without departing from the scope of the presentdisclosure. For example, the ingestible device 2500 may calculate themean and the standard deviation of multiple data sets in parallel inorder to speed up the overall computation time. Furthermore, it shouldbe noted that the steps and descriptions of FIG. 33 may be combined withany other system, device, or method described in this applications, andany of the ingestible devices or systems discussed in this applicationcould be used to perform one or more of the steps in FIG. 33.

FIG. 34 is data from an example of fasted transit through anindividual's GI tract in accordance with some embodiments of the device.Graph 3400 shows a sample set of data gathered by an ingestible deviceflashing different wavelengths of light as it transits through thegastrointestinal tract. This raw data shows an actual transit by aningestible device configured similar to the ingestible device 1900, andacquiring data similar to the methods described in relation to FIGS.21-24. FIG. 34 also shows consuming cold drinks and/or meals more than30 minutes after ingesting the device do not alter the temperaturereadings of the device, indicating that the device exited the stomachbefore 30 minutes had passed.

Similar to the behavior shown in the green reflectance data 2426 and theblue reflectance data 2428 of FIG. 24, it can be seen that the radialgreen and radial blue data sets follow each-other closely, and followsimilar patterns with a relatively flat detected value. Also, similar tothe red reflectance data 2430 of FIG. 24, it can be seen that the reddata set begins to diverge from the blue and green data sets quickly,around the one-hour mark, as the ingestible device 1900 undergoes apyloric transition (e.g., pyloric transition 2416 (FIG. 24)). Betweenhours two-three, the response to the red wavelength illumination and theaxial infrared illumination increases substantially, reaching an apexaround the three-hour mark. This corresponds through transit through theduodenum (e.g., duodenum 2406 (FIG. 24)), reaching a treitz transitioninto the jejunum (e.g., treitz transition 2418 into jejunum 2408 (FIG.24)). From hours three-five, the decrease in the detected red and axialinfrared reflectance is consistent with transit through the jejunum, andan ileocaecal transition (e.g., ileocaecal transition 2420 (FIG. 24))occurs near the five-hour mark. An increase in the response to thedetected infrared reflectance relative to the red reflectance from thefive-hour mark to the seven-hour mark is similarly consistent with acaecal transition into the large intestine (e.g., caecal transition 2422into large intestine 2412 (FIG. 24)).

FIG. 35 is a color map, showing the changing levels of reflected lightdetected by the device in 13 different trials. This corresponds to a setof tests conducted using an ingestible device similar to the ingestibledevice 1900. In FIG. 35, the data gathered from the red, green, and bluesensors were normalized, and combined into a single color post-hoc,after the ingestible device had been retrieved and the data extractedfrom the device. Each data set gathered from the detectors was mappedinto a single hexadecimal color code, representing the relative size ofthe measured red, green and blue data in each data set. After mappingeach data set into a single representative color, the graph 3400 wasproduced to shows the differences in the measured data as the devicetransits through the gastrointestinal tract. The graph 3400 displays thedata gathered by an ingestible device in a number of human trials,wherein p1t3, p1t4, p2t1, p2t2, p2t5, p3t1, p3t3, p3t4 show fastedtransit, and p1t1, p1t2, p2t3, p2t4, p3t2 show fed transit (i.e.,subjects had recently consumed food). Note that the device itself doesnot function as a color imaging device, and graph 3400 is only presentedfor illustrative purposes.

In FIG. 35, earlier samples are shown at the top of the graph, and latersamples shows towards the bottom. In general, a red shift is observed innearly all cases of a pyloric transition. Some cases of delayed gastricemptying indicate greenish-yellow colors, and an unidentified meal ofp2t3 shows varying purple/blue coloration between samples 100-700. Colorshift due to exit from the body is shown from samples step 5400-5500 ofp3t2, resulting in a generally light blue being detected. The determinedlocation of the pyloric transition (e.g., the pyloric transition 2416(FIG. 24)) from the stomach to the small intestine is shown with a smallcircle, and in general, it was found that an ingestible device was ableto reliably identify portions of the gastrointestinal tract.

For illustrative purposes the examples given herein focus primarily on anumber of different example embodiments of an ingestible device.However, the possible ingestible devices that may be constructed are notlimited to these embodiments, and variations in the general shape anddesign may be made without significantly changing the functions andoperations of the device. For example, some embodiments of theingestible device may feature a sampling chamber substantially towardsthe middle of the device, along with two sets of axial sensingsub-units, each located on substantially opposite ends of the device.Also, the applications of the ingestible device are not limited merelyto gathering data, sampling and testing portions of the gastrointestinaltract, or delivering medicament. For example, in some embodiments theingestible device may be adapted to include a number of chemical,electrical, or optical diagnostics for diagnosing a number of diseases.Similarly, a number of different sensors for measuring bodily phenomenonor other physiological qualities may be included on the ingestibledevice. For example, the ingestible device may be adapted to measureelevated levels of certain chemical compounds or impurities in thegastrointestinal tract, or the combination of localization, sampling,and appropriate diagnostic and assay techniques incorporated into asampling chamber may be particularly well suited to determine thepresence of small intestinal bacterial overgrowth (SIBO).

At least some of the elements of the various embodiments of theingestible device described herein that are implemented via software maybe written in a high-level procedural language such as object orientedprogramming, a scripting language or both. Accordingly, the program codemay be written in C, C⁺⁺ or any other suitable programming language andmay comprise modules or classes, as is known to those skilled in objectoriented programming. Alternatively, or in addition, at least some ofthe elements of the embodiments of the ingestible device describedherein that are implemented via software may be written in assemblylanguage, machine language or firmware as needed. In either case, thelanguage may be a compiled or an interpreted language.

At least some of the program code used to implement the ingestibledevice can be stored on a storage media or on a computer readable mediumthat is readable by a general or special purpose programmable computingdevice having a processor, an operating system and the associatedhardware and software that is necessary to implement the functionalityof at least one of the embodiments described herein. The program code,when read by the computing device, configures the computing device tooperate in a new, specific and predefined manner in order to perform atleast one of the methods described herein.

Furthermore, at least some of the programs associated with the systems,devices, and methods of the example embodiments described herein arecapable of being distributed in a computer program product comprising acomputer readable medium that bears computer usable instructions for oneor more processors. The medium may be provided in various forms,including non-transitory forms such as, but not limited to, one or morediskettes, compact disks, tapes, chips, and magnetic and electronicstorage. In some embodiments, the medium may be transitory in naturesuch as, but not limited to, wire-line transmissions, satellitetransmissions, internet transmissions (e.g. downloads), media, digitaland analog signals, and the like. The computer useable instructions mayalso be in various formats, including compiled and non-compiled code.

The various embodiments of systems, processes and apparatuses have beendescribed herein by way of example only. It is contemplated that thefeatures and limitations described in any one embodiment may be appliedto any other embodiment herein, and flowcharts or examples relating toone embodiment may be combined with any other embodiment in a suitablemanner, done in different orders, or done in parallel. It should benoted, the systems and/or methods described above may be applied to, orused in accordance with, other systems and/or methods. Variousmodifications and variations may be made to these example embodimentswithout departing from the spirit and scope of the embodiments, which islimited only by the appended claims. The appended claims should be giventhe broadest interpretation consistent with the description as a whole.

1-42. (canceled)
 43. A method for determining a location of aningestible device within a gastrointestinal tract of a body comprising:transmitting a first illumination at a first wavelength towards anenvironment external to a housing of the ingestible device; detecting afirst reflectance from the environment resulting from the firstillumination, and storing a first reflectance value in a first data set,wherein the first reflectance value is indicative of an amount of lightin the first reflectance; transmitting a second illumination at a secondwavelength towards an environment external to the housing of theingestible device, wherein the second wavelength is different than thefirst wavelength; detecting a second reflectance from the environmentresulting from the second illumination, and storing a second reflectancevalue in a second data set, wherein the second reflectance value isindicative of an amount of light in the second reflectance; identifyinga state of the ingestible device, wherein the state is a known orestimated location of the ingestible device; and determining a change inthe location of the ingestible device within the gastrointestinal tractof the body by detecting whether a state transition has occurred, thestate transition detected by comparing the first data set to the seconddata set.
 44. (canceled)
 45. The method of claim 43, wherein comparingthe first data set to the second data set comprises integrating at leastone of (i) the difference between reflectance values stored in the firstdata set and reflectance values stored in the second data set, or (ii)the difference between a moving average of the first data set and amoving average of the second data set.
 46. The method of claim 43,wherein comparing the first data set and the second data set comprisestaking a first mean from reflectance values stored in the first dataset, taking a second mean from reflectance values stored in the seconddata set, and taking a difference between the first mean and the secondmean.
 47. The method of claim 43, wherein comparing the first data setand the second data set comprises incrementing a counter when the meanof the first data set less a multiple of the standard deviation of thefirst data set is greater than a mean of the second data set plus amultiple of the standard deviation of the second data set. 48.(canceled)
 49. The method of claim 43, wherein the first wavelength isin at least one of a red and an infrared spectrum, and the secondwavelength is in at least one of a blue and a green spectrum, andwherein the identified state is a stomach, and when the comparingindicates that the first data set and the second data set have divergedin a statistically significant manner, a state transition has occurred,wherein the state transition is a pyloric transition.
 50. The method ofclaim 43, wherein the first wavelength is in at least one of a red andan infrared spectrum, and the second wavelength is in at least one of ablue and a green spectrum, and wherein the identified state is aduodenum, and when the comparing indicates that a difference between thefirst data set and the second data set is constant in a statisticallysignificant manner, a state transition has occurred, wherein the statetransition is a treitz transition.
 51. (canceled)
 52. The method ofclaim 43, wherein the first wavelength is in an infrared spectrum, andthe second wavelength is in at least one of a green and a blue spectrum,and wherein the identified state is a jejunum, and when the comparingindicates that the first data set and the second data set have convergedin a statistically significant manner, a state transition has occurred,wherein the state transition is an ileocaecal transition.
 53. (canceled)54. The method of claim 43, wherein the first wavelength is in a redspectrum, and the second wavelength is in at least one of a green and ablue spectrum, and wherein the identified state is a caecum, and whenthe comparing indicates that the first data set and the second data sethave converged in a statistically significant matter, a state transitionhas occurred, wherein the state transition is a caecal transition. 55.The method of claim 43, further comprising: measuring a temperaturechange of the environment external to the housing of the ingestibledevice and wherein the identified state is external to the body, andwhen the measured temperature change is above a threshold, a statetransition has occurred, wherein the state transition is entering thestomach. 56-60. (canceled)
 61. An ingestible device comprising: ahousing defined by a first end, a second end opposite from the firstend, and a radial wall extending longitudinally from the first end tothe second end; a sensing unit inside the housing, the sensing unitcomprising: a first optical sensing sub-unit configured to transmit afirst illumination towards an environment external to the housing at afirst wavelength, and to detect a first reflectance from the environmentresulting from the first illumination; a second optical sensing sub-unitconfigured to transmit a second illumination towards an environmentexternal to the housing at a second wavelength, wherein the secondwavelength is different than the first wavelength, and to detect asecond reflectance from the environment resulting from the secondillumination; and a processing module located within the ingestibledevice configured to: store a first reflectance value in a first dataset, wherein the first reflectance value is indicative of an amount oflight detected by the device from the first reflectance; store a secondreflectance value in a second data set, wherein the second reflectancevalue is indicative of an amount of light detected by the device fromthe second reflectance; identify a state of the device, wherein thestate is a known or estimated location of the ingestible device; anddetermine a change in the location of the ingestible device within thegastrointestinal tract of the body by detecting whether a statetransition has occurred, the state transition detected by comparing thefirst data set to the second data set.
 62. (canceled)
 63. The system ofclaim 61, wherein comparing the first data set to the second data setcomprises integrating at least one of (i) the difference betweenreflectance values stored in the first data set and reflectance valuesstored in the second data set, or (ii) the difference between a movingaverage of the first data set and a moving average of the second dataset.
 64. The system of claim 61, wherein comparing the first data setand the second data set comprises taking a first mean from reflectancevalues stored in the first data set, taking a second mean fromreflectance values stored in the second data set, and taking adifference between the first mean and the second mean.
 65. The system ofclaim 61, wherein comparing the first data set and the second data setcomprises incrementing a counter when the mean of the first data setless a multiple of the standard deviation of the first data set isgreater than a mean of the second data set plus a multiple of thestandard deviation of the second data set.
 66. (canceled)
 67. The systemof claim 61, wherein the first wavelength is in at least one of a redand an infrared spectrum, and the second wavelength is in at least oneof a blue and a green spectrum, and wherein the identified state is astomach, and when the comparing indicates that the first data set andthe second data set have diverged in a statistically significant manner,a state transition has occurred, wherein the state transition is apyloric transition.
 68. The system of claim 61, wherein the firstwavelength is in at least one of a red and an infrared spectrum, and thesecond wavelength is in at least one of a blue and a green spectrum, andwherein the identified state is a duodenum, and when the comparingindicates that a difference between the first data set and the seconddata set is constant in a statistically significant manner, a statetransition has occurred, wherein the state transition is a treitztransition.
 69. (canceled)
 70. The system of claim 61, wherein the firstwavelength is in an infrared spectrum, and the second wavelength is inat least one of a green and a blue spectrum, and wherein the identifiedstate is a jejunum, and when the comparing indicates that the first dataset and the second data set have converged in a statisticallysignificant manner, a state transition has occurred, wherein the statetransition is an ileocaecal transition.
 71. (canceled)
 72. The system ofclaim 61, wherein the first wavelength is in a red spectrum, and thesecond wavelength is in at least one of a green and a blue spectrum, andwherein the identified state is a caecum, and when the comparingindicates that the first data set and the second data set have convergedin a statistically significant matter, a state transition has occurred,wherein the state transition is a caecal transition.
 73. The system ofclaim 61, further comprising: a temperature sensor configured to measurea temperature change of the environment external to the housing of theingestible device, wherein the identified state is external to the body,and when the measured temperature change is above a threshold, a statetransition has occurred, wherein the state transition is entering thestomach. 74-84. (canceled)
 85. An ingestible device comprising: ahousing defined by a first end, a second end opposite from the firstend, and a radial wall extending longitudinally from the first end tothe second end; a sampling chamber located proximal to the housing; asensing unit inside the housing, the sensing unit comprising: a firstoptical sensing sub-unit configured to transmit a first illuminationtowards an environment external to the housing at a first wavelength,and to detect a first reflectance from the environment resulting fromthe first illumination; a second optical sensing sub-unit configured totransmit a second illumination towards an environment external to thehousing at a second wavelength, and to detect a second reflectance fromthe environment resulting from the second illumination; a processingmodule located within the ingestible device configured to: determine alocation of the ingestible device within the gastrointestinal tract ofthe body based on the first reflectance and the second reflectance; andsample the gastrointestinal tract when the identified location matches apredetermined location by actuating at least one of a portion of thehousing and the sampling chamber.
 86. The method of claim 85, whereinsampling the gastrointestinal tract by actuating at least one of theportion of the housing and the sampling chamber comprises: moving atleast one of the portion of the housing and the sampling chamber from anorientation that does not allow a sample from the gastrointestinal tractto enter a sample chamber, to an orientation that allows the sample toenter the sample chamber. 87-91. (canceled)